I am new in angular js.
my array -
"cards":[
"xxx Bank Credit Card",
"yyy Bank Debit Card"
],
what i am tring get only xxx adn yyy or Credit and Debit from the string .I am using angular js 1.2.23 .
I am new in angular js. my array -
what i am tring get only xxx adn yyy or Credit and Debit from the string .I am using angular js 1.2.23 . |
|||||
|
Try this
Use in view like
Ref - See here |
|||
|
you can just do it using pure js
|
|||
|
You can even use default Filter of Angular Js " limitTo() " . it is very helpful but not a splitter , https://docs.angularjs.org/api/ng/filter/limitTo in your case you can use it like {{cards[0] | limitTo(3) }} =xxx |
|||
|