1

Here is my index.html

<html lang="en" ng-app="bootstrapDemoApp" id="top">
<head>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet"/>
<link href="styles/select2.css" rel="stylesheet"/>
<link href="styles/select2-bootstrap.css" rel="stylesheet"/>

<link href="styles/style.css" rel="stylesheet"/>
<title>Bootstrap App</title>
</head>
<body>

<div class="container-fluid" ui-view>
</div>
    <hr/>

<script src="scripts/angular.js"></script>
<script src="scripts/angular-sanitize.js"></script>
<script src="scripts/angular-ui-router.min.js"></script>
<script src="scripts/ui-bootstrap-tpls-0.10.0.js"></script>
<script src="scripts/select.js"></script>
<script src="scripts/script.js"></script>

</body>
</html>

My JS Code:

var bootstrapApp = angular.module('bootstrapDemoApp', ['ui.bootstrap','ui.router','ngSanitize', 'ui.select']);

Now, when i go to my URL i get the following error:

GET http://localhost/ASC/template/tooltip/tooltip-popup.html 404 Not Found 0ms angular.js (line 7991)

I am getting this error with "accordion-group", "alerts", "buttons", and all the angularUI bootstrap directives!

I cant figure what am i doing wrong here. i have included the proper "tpls" file. And included that in my app module as well.

Please help me out!

spyderReloaded
  • 155
  • 2
  • 13
  • Silly mistake on my part: had this line in my script.js file: $templateCache.removeAll(); Removed this line and VOILA!!! :) – spyderReloaded Apr 04 '14 at 07:39
  • I followed the advice [here](http://stackoverflow.com/questions/14961498/angular-ui-bootstrap-directive-template-missing) and did not have to modify the `$templateCache`. – Jasen Sep 26 '14 at 20:58

1 Answers1

3

Okay, so here's the deal... ui-bootstrap-tpls-*.js files contain the templates so that we don't have to define the templates ourseleves (though we can override the default design!). Now, these templates are stored in $templateCache. I had the following line in my script.js file:

$templateCache.removeAll();

This piece of code removed all the stored templates. Remove this line and VOILA :)

spyderReloaded
  • 155
  • 2
  • 13