Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This kind of error occurs when you write in a dependency for a controller, service, etc, and you haven't created or included that dependency.</p> <p>In this case, <code>$modal</code> isn't a known service. It sounds like you didn't pass in ui-bootstrap as a dependency when bootstrapping angular. <code>angular.module('myModule', ['ui.bootstrap']);</code> Also, be sure you are using the latest version of ui-bootstrap (0.6.0), just to be safe.</p> <p>The error is thrown in version 0.5.0, but updating to 0.6.0 does make the $modal service available. So, update to version 0.6.0 and be sure to require ui.boostrap when registering your module.</p> <p><strong>Replying to your comment:</strong> This is how you inject a module dependency.</p> <pre><code>&lt;!-- tell Angular what module we are bootstrapping --&gt; &lt;html ng-app="myApp" ng-controller="myCtrl"&gt; </code></pre> <p>js:</p> <pre><code>// create the module, pass in modules it depends on var app = angular.module('myApp', ['ui.bootstrap']); // $modal service is now available via the ui.bootstrap module we passed in to our module app.controller('myCtrl', function($scope, $uibModal) { }); </code></pre> <h2>Update:</h2> <p>The <code>$modal</code> service has been renamed to <code>$uibModal</code>. </p> <p><strong>Example using $uibModal</strong></p> <pre><code>// create the module, pass in modules it depends on var app = angular.module('myApp', ['ui.bootstrap']); // $modal service is now available via the ui.bootstrap module we passed in to our module app.controller('myCtrl', function($scope, $uibModal) { //code here }); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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