angular / angular.io

Website for the Angular project (see github.com/angular/angular for the project repo)
https://angular.io
MIT License
1.03k stars 880 forks source link

StyleGuide - In Pipes, "Always implement PipeTransform..." #1158

Open mgechev opened 8 years ago

mgechev commented 8 years ago

To be discussed.

// cc @johnpapa @wardbell


zoechi commented 8 years ago

This would then probably apply to all lifecycle callbacks for all directives, components, and pipes

OnInit, OnChanges, AfterViewInit, ...

mgechev commented 8 years ago

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.