title: ReferenceError: $scope is not defined from angularjs directive
body: <p>I'm trying to access <code>$scope</code> in my <code>angularjs</code> (<code>ionic framework</code>) controller are getting this error</p>
  
  <p><code>ReferenceError: $scope is not defined</code></p>
  
  <p>Following is my setup</p>
  
  <pre><code>#directive recipe form
  angular.module('directive.recipeForm',[])
    .directive('recipeForm', function(){
      return {
         restrict: 'E',
         controller: 'newRecipeCtrl',
         scope: false,
         templateUrl: 'templates/directives/recipe_form.html'
      }
    });
  
  #templates/directives/recipe_form.html
  &lt;form ng-submit="recipeSave()"&gt;
    &lt;input type='text' ng-model='recipeFormData.name' &gt;  
    &lt;input type="submit" id="submit" value="Submit" /&gt;
  &lt;/form&gt;
  
  #recipe controller
  angular.module('ft.controllers.newRecipe', [])
    .controller('newRecipeCtrl', ['$scope', '$rootScope', '$ionicModal', '$timeout', '$http', 'Settings',function($scope, $rootScope, $ionicModal, $timeout, $http, Settings){
  
        $scope.recipeFormData={ name: 'sample name' };
  
        $scope.recipeSave = function(){
           // error from comes here
        }
      }]);
  </code></pre>
  
  <p>And when the form loads it correctly access the values in <code>$scope.recipeFormData</code> and set the text box value to 'sample name', but when I click save button, it fires the <code>recipeSave</code> method , but inside that I dont have the <code>$scope</code> variable</p>
  
  <p>And I do understand that there are lots of SO questions with the same error, and I checked them too. but most of them users controller directly binded to the view, not as a directive.  </p>
  
  <p>What I could be doing wrong?</p>