Scope controller data-binding



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()" />

my controller:

.controller('myCtrl', function($scope, $ionicSideMenuDelegate) {
   $ = function () {    

state definition:

.state('eventmenu.home', {
  url: "/home",
  views: {
    'menuContent' :{
      templateUrl: "home.html",

Here is a plunk to understand what I mean.


You need to be using “dot notation”. Because of inheritance, simple values will not do two way binding.

Here is a working example :

Definitive Resource :

Issue with model binding when using ionic

Thank you very much!!! I was used to use dot notation every time and I never notice and fully understand primitive data-binding!