how to add icons in row which is generated dynamically in ionic

拥有回忆 提交于 2019-12-11 16:27:38

问题


I am trying to make simple demo in ionic .I have one footer having one icon ion-compose(bottom left icon).When i click on that icon it show a pop up screen I enter name in text field and press save button .then it generate a row which have same text as written in textfield of popup screen.I need to add icon buttons on row (like delete button , edit button).can we add icon on dynamically generated row as I did in footer (bottom left ion-composer). Please add ion on row

here is my code

http://codepen.io/anon/pen/qdEEPW

   <ion-item ng-repeat="item in items">
                {{item.testcase}}
                <ion-reorder-button class="ion-navicon"></ion-reorder-button>

            </ion-item>

please press bottom button on left side of footer .when click it show pop up snd fill entry it generate the row.I need to add icons on row


回答1:


you will have to be able to modify their framework to take a new key/value from the items object and pass it to the class that it gives the div.

res.class="icon-class";
$scope.items.push(res)

I modified your codepen to show you can pass the items object a class key/value http://codepen.io/anon/pen/XbJJzO



来源:https://stackoverflow.com/questions/29861053/how-to-add-icons-in-row-which-is-generated-dynamically-in-ionic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!