title: Not able to call AngularJS function?
body: <p>I am trying to call an AngularJS function written in demo.js whenever I click a menu button in HTML page <code>abc.html</code>. But it is not going inside the demo.js.</p>
  
  <p>Below is the snippet of code:</p>
  
  <pre><code>****code from abc.html***********
  &lt;div id="all" ng-class="{hide:showmenu,slide:!showmenu}"&gt;
      &lt;div class="overlay" ng-class="{show:showmenu}" ng-swipe-left="showmenu=false"&gt;&lt;/div&gt;
          &lt;div id="header"&gt;
              &lt;button ng-click="toggleMenu()"&gt;&lt;/button&gt;
              &lt;h1&gt;Demo&lt;/h1&gt;
           &lt;/div&gt;
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>demo.js***************************
  
  var app = angular.module('myApp', ['ngRoute','ngTouch']);
      app.directive('mySlideController', ['$swipe',
          function($swipe) {
              return {
              restrict: 'EA',
              link: function(scope, ele, attrs, ctrl) {
              var startX, pointX;
              $swipe.bind(ele, {
              'start': function(coords) {
              startX = coords.x;
              pointX = coords.y;
          },
          'move': function(coords) {
           var delta = coords.x - pointX;
          // ...
      },
      'end': function(coords) {
      // ...
      },
      'cancel': function(coords) {
      // ...
  }
  });
  }
  }
  }]);
  
  app.controller("AppController", function($scope){
       $scope.showmenu=false;
       $scope.toggleMenu = function(){
           $scope.showmenu=($scope.showmenu) ? false : true;
       }
  });
  </code></pre>