Hi,
I don’t understand why data-binding is not working. When I change the value of “query” from the view. The value still undefined from the controller associated with the view. Do I miss something about scopes?
home template:
<ion-content has-header="true" padding="true">
input:<input type="text" style="background-color:#ff9"
ng-model="query" ng-change="search()" />
query:{{query}}
</ion-content>
my controller:
.controller('myCtrl', function($scope, $ionicSideMenuDelegate) {
$scope.search = function () {
alert($scope.query);
};
})
state definition:
.state('eventmenu.home', {
url: "/home",
views: {
'menuContent' :{
templateUrl: "home.html",
controller:"myCtrl"
}
}
})
Here is a plunk to understand what I mean.