Adding Custom Element To Ngrepeat List
I am developing a mobile app using the cordova + onsenui + angularJs and there are special requirements for populating the ngRepeat list. Some items could have additional paramet
Solution 1:
You can achieve the desired results by adding an ng-if statement to HTML elements that you only want to appear in the DOM when the item in ng-repeat has certain characteristics. For example:
<ons-list-itemmodifier="tappable"ng-repeat="item in items"><labelclass="checkbox checkbox--list-item"><inputtype="checkbox"ng-model="item.selected"></label><buttonng-if="item.name=='Potato'">This button will only appear for item3</button></ons-list-item>In the above example, the button will only appear in the DOM if the item.name is Potato.
Post a Comment for "Adding Custom Element To Ngrepeat List"