Slides for the Angular After Hours meetup group: https://www.meetup.com/Angular-AfterHours/events/232687733/
This session is all about pipes: what they are and how to build our own. By the end of this workshop we will build an open source library of angular pipes! Don't forget to checkout the Angular After Hours repository on github: https://github.com/Angular-AfterHours/pipes
20. Pipe is a Class that
implements the
PipeTransform
interface
21. import {PipeTransform} from "@angular/core";
export class Capitalize implements PipeTransform {
transform(value:string):string {
let first = value.substr(0, 1).toUpperCase();
let rest = value.substring(1).toLowerCase();
return first + rest;
}
}
33. HOW IT WORKS?
- Choose a pipe to work on
- Mark it in this work sheet:
http://tinyurl.com/ztjtd25
- Build your pipe on a separate branch
- Create pull request when done