0
yo angular
bower install angular-bootstrap --save

added 'ui.bootstrap' in app.js. added

<script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>

in index.html. checked bower.json that it has 'angular-bootstrap'.

now i got

Uncaught Error: [$injector:unpr] Unknown provider: $$qProvider <- $$q <- $animate <- $compile

here is my whole code [app/scripts/app.js]

'use strict';

/**
 * @ngdoc overview
 * @name radio2App
 * @description
 * # radio2App
 *
 * Main module of the application.
 */
angular
  .module('radio2App', [
    'ngAnimate',
    'ngCookies',
    'ngRoute',
    'ui.bootstrap'
  ])
  .config(function ($routeProvider) {
    $routeProvider
      .when('/', {
        templateUrl: 'views/main.html',
        controller: 'MainCtrl'
      })
      .when('/about', {
        templateUrl: 'views/about.html',
        controller: 'AboutCtrl'
      })
      .otherwise({
        redirectTo: '/'
      });
  });

[app/scripts/main.js]

'use strict';

/**
 * @ngdoc function
 * @name radio2App.controller:MainCtrl
 * @description
 * # MainCtrl
 * Controller of the radio2App
 */
angular.module('radio2App')
  .controller('MainCtrl', function ($scope) {
    $scope.awesomeThings = [
      'HTML5 Boilerplate',
      'AngularJS',
      'Karma'
    ];
  });

[bower.json]

{
  "name": "radio2",
  "version": "0.0.0",
  "dependencies": {
    "angular": "^1.3.0",
    "json3": "^3.3.0",
    "es5-shim": "^4.0.0",
    "angular-animate": "^1.3.0",
    "angular-cookies": "^1.3.0",
    "angular-route": "^1.3.0",
    "angular-bootstrap": "~0.12.0"
  },
  "devDependencies": {
    "angular-mocks": "~1.3.0",
    "angular-scenario": "~1.3.0"
  },
  "appPath": "app"
}

[app/index.html]

.....
    <!-- build:js(.) scripts/vendor.js -->
    <!-- bower:js -->
    <script src="bower_components/angular/angular.js"></script>
    <script src="bower_components/angular-animate/angular-animate.js"></script>
    <script src="bower_components/angular-cookies/angular-cookies.js"></script>
    <script src="bower_components/angular-route/angular-route.js"></script>
    <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
    <!-- endbower -->
    <!-- endbuild -->
.....

most of codes are made by yo scaffolding tool.. i added just few line as i mentioned.

2
  • add app.js to here.. Commented Jan 11, 2015 at 16:15
  • please put your whole code here. It seems ngAnimate error or $q error as well. but not sure. Inject ui.bootstrap as dependency in your angular.module line as mentioned below else come up with soruce code. Commented Jan 11, 2015 at 16:58

1 Answer 1

1
angular.module('myModule', ['ui.bootstrap']);

you should include BootStrap Dependency in your Module Configuration like above code,it's necessary to add when you are using BootStrap

Sign up to request clarification or add additional context in comments.

4 Comments

I already included 'bootstrap dependency' in app.js, and double-checked BUT still same error..
bower uninstall angular-boostrap, delete everything about this from 'scripts/*.js', 'app.js' 'bower.json' 'index.html' BUT got same error.. why?? where remains angular-boostrap things??
Can you provide Plnkr Example
finally solved.. it was problem from installing angular-boostrap. bower asekd me which version and version will use.. i selected right one, then everything works soooo well!! :D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.