1

I'm trying to include UI bootstrap into my script reference, but i'm keeping getting the error saying that my module is not instantiated due to 'ui.bootstrap' not available! Could anybody tell me what I'm doing wrong here?

below is the head part of my index.html

<!-- META -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="scripts/angular.min.js"></script>
<script type="text/javascript" src="scripts/ui-bootstrap-tpls.min.js">
</script>
<script type="text/javascript" src="main.js"></script>
<link rel="stylesheet" href="css/bootstrap.min.css"/>

</head>

here's the first line of main.js:

var red_joker = angular.module('red_joker', ['ui.bootstrap']);
Aaron Shen
  • 8,124
  • 10
  • 44
  • 86

2 Answers2

0

Somewhere along the line the module name got changed from ui.bootstrap to just ui.

mortsahl
  • 602
  • 6
  • 18
  • Looks like I misled you. My answer stemmed from my having the same problem. The reason for me is that I used bower to install angular-ui ... turns out that what was installed was version 0.40 ... and they did use "ui" ... but after realizing that and manually installing the latest (0.90) version it is back to ui.bootstrap. – mortsahl Jan 02 '14 at 20:45
0

Make sure that your karma.conf.js file has all the JS files your application is using.

AngularJS Jasmine Test Fails: Failed to instantiate module

Community
  • 1
  • 1
pherris
  • 17,195
  • 8
  • 42
  • 58