I am studying the angularJS home page samples and I came across the following usage of the angularJS ng-repeat directive:
<tr ng-repeat="project in projects | filter:search | orderBy:'name'">
Is the pipe character an angularJS keyword or a plain JS keyword? Also, what is the desired effect of this keyword?
The pipe character has special meaning in AngularJS expression language and is used to invoke filters.
In short: this is AngularJS keyword to invoke filters.
It's an Angular keyword/symbol which is used when you want to apply some Angular filter to the input. In this case you may read the expression as follows:
projects
collection,search
filter on it,search
filter and apply the orderBy
filter on it,orderBy
filter and feed it to ng-repeatIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With