title: ngSubmit is not triggering function in controller
body: <p>I am relatively very new to AngularJS and javascript Please be merciful while answering.</p>
  
  <p>I am trying to create one sample application where  I want to nest controllers. MainController which will always be there acting as parent container which will render menu and user name on top if user is logged in. For now I am checking if user is stored in localStorage.</p>
  
  <p>Each page will have its own controller which will do page specific things.</p>
  
  <p>I am stuck at ng-submit and why its not working?</p>
  
  <p>Any help is appreciated.</p>
  
  <p>Index.html</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.js"&gt;&lt;/script&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-route.js"&gt;&lt;/script&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-resource.js"&gt;&lt;/script&gt;
      &lt;script src="angularapp.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body ng-app="myAngularApp"&gt;
      &lt;div ng-controller="MainController"&gt;
      &lt;div ng-show="isLoggedIn"&gt;Menu&lt;/div&gt;
          &lt;div ng-view&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>
  login.html</p>
  
  <pre><code>  &lt;from ng-submit="login()"&gt;
      &lt;input type="text" id="username" ng-model="username"&gt;&lt;/input&gt;
      &lt;input type="password" id="password" ng-model="password"&gt;&lt;/input&gt;
      &lt;input type="submit" value="submit" id="submit" ng-submit="login()"&gt;&lt;/input&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>angularapp.js</p>
  
  <pre><code>angular.module('myAngularApp',['ngRoute','ngResource'])
  .config(['$routeProvider',function($routeProvider){
  
      $routeProvider.when('/home',{
          controller:'SubController',
          templateUrl:'templates/home.html'
      })
      .when('/login',{
          controller:'MainController',
          templateUrl:'templates/login.html'
      });
  }])
  .controller('MainController',['$scope','$window','userService',function($scope,$window,userService){
      $scope.isLoggendIn=userService.isLoggedIn;
      console.log('here I come');
      $scope.username='';
      $scope.password='';
      $scope.login=function(){
          alert('Ignored???');
          $window.localStorage['myUser']={username:$scope.username,password:$scope.password};
          consoel.log('user is logged in now');
      };
  }])
  .controller('SubController',['$scope',function($scope){
      $scope.myContent='Contenst to show after logged in';
  }])
  .service('userService',['$window',function($window){
      var self=this;  
      self.isLoggedIn=function(){
          if($window.localStorage['myUser'])
              return true;
          else 
              return false;
      };
  }]);
  </code></pre>