July 2017
Intermediate to advanced
454 pages
10h 1m
English
An impure pipe is called for every change detection cycle, regardless of whether the value or parameters change. In order to use impure pipes, we should use the pipe decorator pure as false.
Setting the pipe decorator value as pure will check for the pipe's output irrespective of whether it's value changed or not and will keep updating the value provided by the pipe.
Defining an impure pipe is same as creating any custom user-defined pipe, the only difference being that in the @Pipe decorator we will explicitly mention the pipe to be impure by setting the value to false.
Below is the syntax to define a impure pipe by setting the value of pipe to false:
import { Pipe, PipeTransform ...Read now
Unlock full access