<body ng-app="app">
<ion-pane ng-controller="myCtrl">
<ion-header-bar class="bar-stable">
</ion-header-bar>
<ion-content class="padding">
<input ng-model="myInput" style="border:1px solid #ddd;width:100%;padding:5px" type="text" placeholder="search"/>
<br>
<br>
<br>
<br>
<br>
<ion-footer-bar ng-show="!loading" align-title="center">
<div class="padding" style="position:absolute;bottom:0;width:100%">
<button ng-click="search(myInput)" class="button button-block button-positive footer-btn" type="submit">able to get myInput value if placed within ion-content</button>
</div>
</ion-footer-bar>
</ion-content>
<ion-footer-bar ng-show="!loading" align-title="center">
<div class="padding" style="position:absolute;bottom:0;width:100%">
<button ng-click="search(myInput)" class="button button-block button-positive footer-btn" type="submit">cannot retrieve myInput value here</button>
</div>
</ion-footer-bar>
</ion-pane>
</body>
What is the best solution for this issue? I am facing a dilemma where I need to separate the click event and input field into two different directives for styling purposes, but this approach is leading to difficulties in accessing the value of ng-model.