Working on Ionic Search with Popup. It is working on
$scope.selectables = [
1, 2, 3 ];
But I want it to work on json
$scope.countries = [
{id: 1, text: 'USA', checked: false, icon: null},
{id: 2, text: 'France', checked: false, icon: null},
{id : 3, text: 'Japan', checked: true, icon: null}];
When I click on Select it button then Bind value USA, France, Japan. I don't want to push value in Array.
The code I'm using can be found on codepen.io on the next link:
http://codepen.io/anujsphinx/pen/Lbryzz
change your options
options="selectables" to options="countries" and print it as option.text to display country name and here is the working plunker check it
<div class="item item-body">
<button class="button button-positive" modal-select="" ng-model="someModel" options="countries" modal-title="Select " has-search="true">
{{someModel.text}}
<div class="option">
{{option.text}}
</div>
</button>
<div class="item">
someModel: {{someModel.text}}
</div>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With