title: $scope.$watch in Angular doesn't work in Ionic/Cordova
body: <p>I'm building an app using the <a href="http://ionicframework.com/" rel="noreferrer">Ionic Framework</a> for which I now want to create some on-off switches (which are basically fancy styled checkboxes). When a person flips the switch I want to send this to the server, so I'm first trying to catch the switch change event. In a basic angular install I tried it with a simple checkbox in the html (<code>&lt;input type="checkbox" ng-model="theswitch"&gt;</code>) and a <code>$watch</code> in my controller like so:</p>
  
  <pre><code>$scope.$watch('theswitch', function(){
      console.log('theswitch changed');
      if ($scope.boel){
          console.log('theswitch is TRUE');
      } else {
          console.log('theswitch IS FALSE');
      }
  });
  </code></pre>
  
  <p>This works like a charm. I now implemented a similar thing in my Ionic app. My HTML is like this:</p>
  
  <pre><code>&lt;ion-item class="item-toggle"&gt;
      Mail
      &lt;label class="toggle"&gt;
          &lt;input type="checkbox" ng-model="mail"&gt;
          &lt;div class="track"&gt;
              &lt;div class="handle"&gt;&lt;/div&gt;
          &lt;/div&gt;
      &lt;/label&gt;
  &lt;/ion-item&gt;
  </code></pre>
  
  <p>and my controller looks like this:</p>
  
  <pre><code>myControllers.controller('AccountCtrl', function ($scope) {
      $scope.$watch('mail', function(){
          console.log('THE MODEL CHANGED');
          if ($scope.mail) {
              console.log('The button was turned ON.');
          } else {
              console.log('The button was turned OFF.');
          }
      });
  });
  </code></pre>
  
  <p>Upon loading the screen I get two logs:</p>
  
  <pre><code>THE MODEL CHANGED
  The button was turned OFF.
  </code></pre>
  
  <p>After that I can flip the switch a million times, but I get no log messages anymore, not even an error. Since it works perfectly in my angular test website, but not in my app, I'm kinda lost in what could be wrong.</p>
  
  <p>Would anybody have any idea what I can do to catch this switch event? All tips are welcome!</p>