16.07.2017 Views

AngularJS Essentials

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Data Handling<br />

Color<br />

<br />

<br />

<br />

<br />

Entrance<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

{{car.plate}}<br />

{{car.color}}<br />

{{car.entrance | date:'dd/MM/yyyy hh:mm'}}<br />

<br />

<br />

<br />

Now, we can order the car's list just by clicking on the header's link. Each click will<br />

reorder the list in the ascending or descending order based on the reverse parameter.<br />

uppercase<br />

This parameter displays the content of the expression in uppercase:<br />

{{ expression | uppercase }}<br />

Using filters in other places<br />

We can also use filters in other components such as controllers and services.<br />

They can be used by just injecting $filter inside the desired components.<br />

The first argument of the filter function is the value, followed by the other<br />

required arguments.<br />

[ 60 ]<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!