0
<div class="list">
<li class="item" ng-click="city()" ng-repeat="seg in segmento">{{seg}}</li>
</div>
I have this code in my Ionic framework I would like to get the value of li I’ve tried with name, ng-model someone has any suggestions?
0
<div class="list">
<li class="item" ng-click="city()" ng-repeat="seg in segmento">{{seg}}</li>
</div>
I have this code in my Ionic framework I would like to get the value of li I’ve tried with name, ng-model someone has any suggestions?
1
<div class="list">
<li class="item" ng-click="city(seg)" ng-repeat="seg in segmento">{{seg}}</li>
</div>
The seg
is the selected element, you can pass by parameter.
Browser other questions tagged angularjs ionic
You are not signed in. Login or sign up in order to post.
Pass your segment by parameter to the city function. Ex; city(sec)
– Rafael
Why don’t you take the data directly from the "segment" array? It’s easier.
– PauloFlesch
I thought of going through the parameter, but is that dps I’ll have to pick up this value again.
– rods
You can’t take it by the segment array, because this list has a click I want the value that the user click on the case.
– rods