Open mgechev opened 8 years ago
This would then probably apply to all lifecycle callbacks for all directives, components, and pipes
OnInit
, OnChanges
, AfterViewInit
, ...
Yes, we have it for lifecycle hooks and there's an example for components.
I think it's worth being more explicit by providing an example with a stateful pipe as well, because it might not be obvious that it works for pipes as well.
To be discussed.
// cc @johnpapa @wardbell
Always implement the PipeTransform interface when building a Pipe.
Why? This ensures your custom Pipes will conform to the framework requirements should they change in the future.