What is difference between pure and impure pipe in Angular?

Sathish Harichandrapandian
Sathish Harichandrapandian

Posted On: Feb 22, 2018

 

The difference between pure and impure pipes are:

Pure pipesImpure pipes
Here it only executes a pure pipe only when there is a change in the internal state of the pipe.

Here the execution of the impure pipe is done on every change in the component during the entire cycle.

The change here can be primitive or non-primitive.

Here if you want to be a pipe to be impure then at that time you need to change the settings from flag to false.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Angular 7 Interview Questions

    What's new in Angular 7?

    Angular Elements is enabled to support content projection with the help of web standards for custom elements...

    Angular 7 Interview Questions

    What is IVY Renderer? Is it supported by Angular 7?

    Angular will be releasing a new kind of rendering pipeline and view engine...

    Angular 7 Interview Questions

    What are the Core Dependencies of Angular 7?

    Core DependenciesThere are two types of core dependencies: RxJS and TypeScript...