namespace'ml.common'
Source: ml-common.
Properties
Properties
staticobject2Array
angular filter for converting object properties to arrays
converts { prop: { value: 'val' }}
to [{ value: 'val', __key: 'prop' }]
statictruncate
angular filter for truncating text.
truncates to length
, offset by the length of end
, and concatenates with end
.
ex:
'abcdefg' | truncate:5
returns 'ab...'
'abcdefg' | truncate:5:''
returns 'abcde'
Parameters
Name | Type | Optional | Description |
---|---|---|---|
length |
Number |
|
output length (defaults to |
end |
String |
Yes |
string to append to the input (defaults to |