1. Uppercase,lowercase Case Conversion
{{' lower cap string '|}} //Result: LOWER CAP STRING{{"TANK is good"|}} //Result: Tank is good
2. Date format
{{1490161945000| date:"Yyyy-mm-dd HH:mm:ss"}}//2017-03-22 13:52:25
3, number formatting (keep decimals)
{{149016.1945000| number:2}}
4. Currency Currency format
{{]|}} //Result: $250.00{{] | currency:"Rmb¥"}}//Result: rmb¥250.00
5. Filter Lookup
Input filters can be added to the directive with a pipe character (|) and a filter followed by a colon and a model name.
Filter filter Select a subset from the array
Find the line name for the iphone{{ [{"Age": 20,"id": 10,"Name": "iphone"},{"Age": 12,"id": 11, "name" : "Sunm Xing" },{ "age" :< Span class= "PLN" > 44, "id" : 12, "name" : "test abc" } | Filter:{ ' name ' : ' iphone ' } }}
6, LimitTo interception
{{"1234567890"|:6}}//6-bit {"1234567890" from the front ({"*") | limitto:4 }}//Starting from the back to intercept 4 bits
7. Sort by order
Root ID Descending row{{ [{"Age": 20,"id": 10,"Name": "iphone"},{"Age": 12,"id": 11,"Name": "Sunm Xing"},{"Age": 44,"id": 12,"Name": "Test ABC"}] |By:' ID ':True }}Ascending row by ID{{ [{"Age": 20,"id": 10,"Name": "iphone"},{"Age": 12, "id" : 11 "name" : "SUNM Xing" },< Span class= "PLN" >{ "age" : 44, "id" : 12 , "name" : "test ABC" Span class= "pun" >}] | Orderby: ' ID ' }}
Angular JS Filter notes (go to rookie tutorial)