title: AngularJS - RangeError: 'Maximum call stack size exceeded after' application start
body: <p>After running AngularJS app in by NetBeans error mentioned in title appears. I can't see any points where stack is overloaded, as you see I only initialize two variables for login form handling (i'm at the start of my AngularJS adventure). Can it be some hardware issue or I'm making some unconscious mistake here?</p>
  
  <p>error :</p>
  
  <pre><code>RangeError: Maximum call stack size exceeded
      at c (public_html/bower_components/angular/angular.min.js:115:232)
      at http://localhost:8383/LoginJS/bower_components/angular/angular.min.js:115:506
      at q (public_html/bower_components/angular/angular.min.js:7:355)
      at Object.error (public_html/bower_components/angular/angular.min.js:115:475)
      at http://localhost:8383/LoginJS/bower_components/angular/angular.min.js:89:12
      at ra (public_html/bower_components/angular/angular.min.js:69:475)
      at xa (public_html/bower_components/angular/angular.min.js:58:270)
      at xa (public_html/bower_components/angular/angular.min.js:58:402)
      at ba (public_html/bower_components/angular/angular.min.js:56:264)
      at A.link (public_html/bower_components/angular-route/angular-route.min.js:7:224) (13:52:05:371 | error)
  </code></pre>
  
  <p>app.js</p>
  
  <pre><code>angular.module('myapp', ['ngRoute']).config(function($routeProvider) {
           $routeProvider
                   .when('/', {
                       templateUrl: 'index.html'
           })
                   .when('/dashboard', {
                       templateUrl: 'dashboard.html'
           })
                   .otherwise(({
                       redirectTo: '/'
           }));
  });
  </code></pre>
  
  <p>loginCtrl.js</p>
  
  <pre><code>angular.module('myapp').controller('loginCtrl', function($scope, $location) {
      $scope.submit = function() {
          var username = $scope.username;
          var password = $scope.password;
  
          if($scope.username == 'admin' &amp;&amp; $scope.password == 'admin') {
              $location.path('/dashboard');
          }
      };
  })
  </code></pre>
  
  <p>index.html</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;TODO supply a title&lt;/title&gt;
          &lt;meta charset="UTF-8"&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
          &lt;script src="bower_components/angular/angular.min.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script src="bower_components/angular-route/angular-route.min.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script src="app.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script src="scripts/controllers/loginCtrl.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;/head&gt;
      &lt;body ng-app="myapp"&gt;
          &lt;div ng-view&gt;&lt;/div&gt;
          &lt;div ng-controller="loginCtrl"&gt;
              &lt;form action="/" id="login"&gt;
                  Username: &lt;input type="text" name="username" id="username" ng-model="username"&gt;&lt;br&gt;
                  Password: &lt;input type="password" name="password" id="password" ng-model="password"&gt;&lt;br&gt;
                  &lt;button type="button" ng-click="submit()"&gt;Login&lt;/button&gt;
              &lt;/form&gt;
          &lt;/div&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>dashboard.html</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;TODO supply a title&lt;/title&gt;
          &lt;meta charset="UTF-8"&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
          &lt;script src="bower_components/angular/angular.min.js" type="text/javascript"&gt;&lt;/script&gt;
           &lt;script src="bower_components/angular-route/angular-route.min.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script src="app.js" type="text/javascript"&gt;&lt;/script&gt;
  
      &lt;/head&gt;
      &lt;body ng-app="myapp"&gt;
          &lt;div ng-view&gt;&lt;/div&gt;
          some text
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>