title: $dialog injection causing error in AngularJS
body: <p>Although this program works fine in Plunker <a href="http://plnkr.co/edit/1RmSI3liMKrE89f9YwFC?p=preview" rel="nofollow">http://plnkr.co/edit/1RmSI3liMKrE89f9YwFC?p=preview</a>, When I add similar in MVC I get error about angular injector. 
  More specifically in following line:</p>
  
  <pre><code>var app = angular.module('MainCtrl', ['ui.bootstrap']);
  
  app.controller('MainCtrl', ['$scope', '$dialog', function ($scope, $dialog) {
  </code></pre>
  
  <p>And error is as followed: </p>
  
  <pre><code>Error: [$injector:unpr] http://errors.angularjs.org/1.2.19/$injector/unpr?p0=%24dialogProvider%20%3C-%20%24dialog v/&lt;@http://localhost:51533/Scripts/angular.min.js:6:443 dc/l.$injector&lt;@http://localhost:51533/Scripts/angular.min.js:36:196 c@http://localhost:51533/Scripts/angular.min.js:34:273 dc/n.$injector&lt;@http://localhost:51533/Scripts/angular.min.js:36:266 c@http://localhost:51533/Scripts/angular.min.js:34:273 d@http://localhost:51533/Scripts/angular.min.js:35:1 g/&lt;.instantiate@http://localhost:51533/Scripts/angular.min.js:35:163 Pd/this.$get&lt;/&lt;@http://localhost:51533/Scripts/angular.min.js:67:417 K/&lt;@http://localhost:51533/Scripts/angular.min.js:54:40 q@http://localhost:51533/Scripts/angular.min.js:7:363 K@http://localhost:51533/Scripts/angular.min.js:53:405 f@http://localhost:51533/Scripts/angular.min.js:47:243 f@http://localhost:51533/Scripts/angular.min.js:47:243 z/&lt;@http://localhost:51533/Scripts/angular.min.js:46:374 cc/c/&lt;/&lt;@http://localhost:51533/Scripts/angular.min.js:18:279 Zd/this.$get&lt;/k.prototype.$eval@http://localhost:51533/Scripts/angular.min.js:112:308 Zd/this.$get&lt;/k.prototype.$apply@http://localhost:51533/Scripts/angular.min.js:113:24 cc/c/&lt;@http://localhost:51533/Scripts/angular.min.js:18:237 d@http://localhost:51533/Scripts/angular.min.js:35:27 cc/c@http://localhost:51533/Scripts/angular.min.js:18:145 cc@http://localhost:51533/Scripts/angular.min.js:18:349 Xc@http://localhost:51533/Scripts/angular.min.js:17:432 @http://localhost:51533/Scripts/angular.min.js:213:1 jQuery.Callbacks/fire@http://localhost:51533/Scripts/jquery-2.1.1.js:3073:1 jQuery.Callbacks/self.fireWith@http://localhost:51533/Scripts/jquery-2.1.1.js:3185:7 .ready@http://localhost:51533/Scripts/jquery-2.1.1.js:3391:3 completed@http://localhost:51533/Scripts/jquery-2.1.1.js:3407:2
  e/&lt;()angular.min.js (line 92)
  Rd/this.$get&lt;/&lt;()angular.min.js (line 68)
  Zd/this.$get&lt;/k.prototype.$apply()angular.min.js (line 113)
  cc/c/&lt;()angular.min.js (line 18)
  d()angular.min.js (line 35)
  cc/c()angular.min.js (line 18)
  cc()angular.min.js (line 18)
  Xc()angular.min.js (line 17)
  angular.min.js()angular.min.js (line 213)
  jQuery.Callbacks/fire()jquery-2.1.1.js (line 3073)
  jQuery.Callbacks/self.fireWith()jquery-2.1.1.js (line 3185)
  .ready()jquery-2.1.1.js (line 3391)
  completed()jquery-2.1.1.js (line 3407)
  angul
  </code></pre>