Base filters

date

  • To convert the date to string
  • Input argument: date
example
<div>{{when | date:yyyy-mm-dd }}</div>

filter

  • To filter the list
  • Input argument: variable

Example

slice

  • To slice the list
  • input arguments: numbers
example
<div al-repeat="it in list | slice:a"></div>
<div al-repeat="it in list | slice:a,b"></div>

toArray

  • converts an object to array (for al-repeat)
  • input arguments: key, value
example
<div al-repeat="item in object | toArray:key,value track by key">

Example

orderBy

  • sorts an array by key (for al-repeat)
  • input arguments: key, reverse
example
<div al-repeat="item in array | orderBy:key,reverse">

Example

throttle

  • makes delay for output, pattern debounce
  • input arguments: delay
example
<input al-value="link" type="text" />
<p>{{link | throttle:300 | loadFromServer}}</p>

Example

json

  • display data in json style
example
{{data.value | json}}
{{this | json}}
comments powered by Disqus