Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy does this Angular controller throw "Error: Unknown provider: nProvider <- n"?
    text
    copied!<p><a href="http://jsfiddle.net/TCT8n/1/" rel="noreferrer">jsFiddle of the code</a>:</p> <pre><code>&lt;div ng-app=""&gt; &lt;div ng-controller="FirstCtrl"&gt; &lt;input type="text" ng-model="data.message" /&gt; {{data.message + " world"}} &lt;/div&gt; &lt;/div&gt; function FirstCtrl($scope) { $scope.data = { message: "Hello" }; } </code></pre> <p>I am just starting to learn Angular using the videos on Egghead.io. Following along I got stuck on the <a href="http://egghead.io/video/angularjs-controllers/" rel="noreferrer">2nd video where John discusses controllers</a>. It works in his video, fails on my machine.</p> <p>the code is so basic I can't figure out what's throwing this error:</p> <pre><code>&gt; Error: Unknown provider: nProvider &lt;- n &gt; at Error (&lt;anonymous&gt;) &gt; at http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.3/angular.min.js:29:36 &gt; at Object.c [as get] (http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.3/angular.min.js:26:310) &gt; at http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.3/angular.min.js:29:121 &gt; at c (http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.3/angular.min.js:26:310) &gt; at d (http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.3/angular.min.js:26:444) &gt; at Object.instantiate (http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.3/angular.min.js:28:80) &gt; at http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.3/angular.min.js:51:512 &gt; at http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.3/angular.min.js:43:67 &gt; at n (http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.3/angular.min.js:7:43) </code></pre> <p>This error gets thrown if I use the google CDN as well (from the error, I thought perhaps it was the cdn's fault).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload