I have an array of prices (0
, 0.99
, 1.99
... etc) that I want to display in <select>
.
I want to use Angular's ng-options
like this
<select ng-model="create_price" ng-options="obj for obj in prices"/>
As it is displayed above it will generate a selection of 0
, 0.99
, 1.99
...
But I want to use a filter in the code such that every time the word 'prices' is presented (or something like that), the code will run a function to change the float numbers to strings and present (free
, 0.99$
, 1.99$
... etc).
I there a way to do that?
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…