Properties

Properties

static
object2Array

angular filter for converting object properties to arrays

converts { prop: { value: 'val' }} to [{ value: 'val', __key: 'prop' }]

static
truncate

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 10)

end

String

Yes

string to append to the input (defaults to '...')