1
votes

I am using fancy-select box using ionic.

http://codepen.io/mhartington/pen/CImqy?editors=101

<fancy-select header-text="Single" allow-empty='false' value="val.single" text="title_text_single" items="title">
</fancy-select>
<script id="fancy-select.html" type="text/ng-template">
    <ion-list>
        <ion-item class="item-text-wrap" ng-click="showItems($event)" ng-model="personalDetailsObj.personalDetails.title">
            {{text}}
            <span class="item-note">
            {{noteText}}                              
            </span>
        </ion-item>
    </ion-list>
</script>

I added ng-model to <ion-item>, but i am not able to get the value.

1

1 Answers

0
votes

Try this by changing value attribute of fancy-select to "personalDetailsObj.personalDetails.title"

<fancy-select header-text="Single" allow-empty='false' value="personalDetailsObj.personalDetails.title" text="title_text_single" items="title">
</fancy-select>
<script id="fancy-select.html" type="text/ng-template">
<ion-list>
    <ion-item class="item-text-wrap" ng-click="showItems($event)">
        {{text}}
        <span class="item-note">
        {{noteText}}                              
        </span>
    </ion-item>
</ion-list>

Hope it helps.