how to add icons in row which is generated dynamic

2019-09-04 08:57发布

问题:

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