title: Simple ng-change not working properly in angularjs
body: <p>I might be missing something stupidly as this simple code doesn't work as expected. What is wrong is the <code>$scope.change</code> function in the MainCtrl doesn't work (no alert box popped up).</p>
  
  <p>In a nutshell, the view is (it's in jade, better to view?)</p>
  
  <pre><code>&lt;body ng-app="epfApp"&gt;
  ...
  label(ng-repeat="question in questions")
      | {{ question.title }}
      input(type="{{question.type}}", ng-change="change()")
  </code></pre>
  
  <p>and in the controller file</p>
  
  <pre><code>angular.module('epfApp')
  .controller('MainCtrl', function ($scope, $window) {
  
      $scope.questions = {
          '1': {
                  'title': 'The first question is?',
                  'type': 'text',
                  'placeholder': 'first question'
              },
  
          '2': {
                  'title': 'The second question is?',
                  'type': 'text',
                  'placeholder': 'second question'
              }
      };
  
      $scope.change = function() {
          $window.alert('text');
      };
  
  });
  </code></pre>
  
  <p>And the route:</p>
  
  <pre><code>$routeProvider
    .when('/', {
      templateUrl: 'views/main.html',
      controller: 'MainCtrl'
    });
  </code></pre>
  
  <p>Now what it is doing properly is that it correctly populates the view with the data created (i.e. the questions json). However, What it is not doing properly is the <strong><code>change()</code></strong> function bound to the input textbox doesn't work.</p>
  
  <p>What am I missing here? This obviously is a very basic job.</p>