Uday Reddy
Uday Reddy

Reputation: 1471

$injector:modulerr error on using angular-strap

I am using angular-strap.

I have gone through following links:

But I get Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.2.16/$injector/modulerr?p0=test&p1=Error%3A%2…gleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.2.16%2Fangular.min.js%3A17%3A431) error on running following code.

<html ng-app="test">
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular-sanitize.min.js"></script>
<script src="//oss.maxcdn.com/angular.strap/2.0.0/angular-strap.min.js"></script>
<script src="//oss.maxcdn.com/angular.strap/2.0.0/angular-strap.tpl.min.js"></script>
<script>
angular.module('test', ['ngAnimate', 'ngSanitize', 'mgcrea.ngStrap']);
</script>
</html>

What is the matter with my code?

Upvotes: 1

Views: 457

Answers (1)

Diana Nassar
Diana Nassar

Reputation: 2303

You've added ngAnimate as a dependency but did not reference angular-animate.js file.

Add this:

<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular-animate.js"></script>

Or lose the 'ngAnimate' in:

angular.module('test', ['ngAnimate', 'ngSanitize', 'mgcrea.ngStrap']);

Upvotes: 1

Related Questions