title: Scope is not defined error
body: <p>I am implementing an Slide Box and tried to use SlideHasChanged Event.</p>
  
  <p>There are some examples in the internet but I have always the same error.</p>
  
  <p>My APP:</p>
  
  <pre><code>    &lt;ion-slide-box on-slide-changed="slideHasChanged($index)"&gt;
        &lt;ion-slide&gt;
          &lt;div class="box blue"&gt;&lt;h1&gt;BLUE&lt;/h1&gt;&lt;/div&gt;
        &lt;/ion-slide&gt;
        &lt;ion-slide&gt;
          &lt;div class="box yellow"&gt;&lt;h1&gt;YELLOW&lt;/h1&gt;&lt;/div&gt;
        &lt;/ion-slide&gt;
        &lt;ion-slide&gt;
          &lt;div class="box pink"&gt;&lt;h1&gt;PINK&lt;/h1&gt;&lt;/div&gt;
        &lt;/ion-slide&gt;
      &lt;/ion-slide-box&gt; 
  </code></pre>
  
  <p>I can switch the slides arround.</p>
  
  <p>In my app.js:</p>
  
  <pre><code>$scope.slideChanged = function(index) {
  switch(index) {
  case 0:
  console.log('I am on slide 0');
  break;
  case 1:
  console.log('I am on slide 2');
  break;
  }
  };
  </code></pre>
  
  <p>Now it should work. And write to the log.</p>
  
  <p>But I always get an $scope is not defined error.</p>
  
  <p>UPDATE:</p>
  
  <p>app.js</p>
  
  <pre><code>angular.controller('appName', function($scope) {
  $scope.slideChanged = function(index) {
  switch(index) {
    case 0:
      console.log('I am on slide 0');
      break;
    case 1:
      console.log('I am on slide 1');
      break;
  }
  };
  });
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code> &lt;div ng-controller="controller1"&gt;
        &lt;ion-slide-box on-slide-changed="slideHasChanged($index)"&gt;
          &lt;ion-slide&gt;
            &lt;div class="box blue"&gt;&lt;h1&gt;BLUE&lt;/h1&gt;&lt;/div&gt;
          &lt;/ion-slide&gt;
          &lt;ion-slide&gt;
            &lt;div class="box yellow"&gt;&lt;h1&gt;YELLOW&lt;/h1&gt;&lt;/div&gt;
          &lt;/ion-slide&gt;
          &lt;ion-slide&gt;
            &lt;div class="box pink"&gt;&lt;h1&gt;PINK&lt;/h1&gt;&lt;/div&gt;
          &lt;/ion-slide&gt;
        &lt;/ion-slide-box&gt;
        &lt;/div&gt;
  </code></pre>