JavaScript Edu Resources. Angular Courses. React Tutorials. Join us!

Angular 2 Working with Pipes

  • x and Angular 2 have an equal number of filters to pipes, but there isn’t direct crossover.
  • Many of the pipes provided by Angular 2 will be familiar if you’ve worked with filters in Angular 1.
  • For example, we can use the pipe to transform a date object in any way we like by providing it with an argument for formatting:

    We pointed our decorator to a in which we make use of the pipe:

    The and pipes are new in Angular 2.

  • Angular 2 provides a special pipe known as , which allows us to bind our templates directly to values that arrive asynchronously.
  • Angular 2 provides some great pipes that carry over well from the filters we are used to in Angular 1.



Angular 2 Series

https://twitter.com/ryanchenkie?lang=en

https://twitter.com/intent/tweet?text=%22Angular%202’s%20async%20allows%20us%20to%20bind%20our%20templates%20directly%20to%20values%20that%20arrive%20asynchronously%22%20via%20@auth0%20http://auth0.com/blog/angular2-series-working-with-pipes/

Comments are closed, but trackbacks and pingbacks are open.