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!

2
  • Silly mistake on my part: had this line in my script.js file: $templateCache.removeAll(); Removed this line and VOILA!!! :) Commented Apr 4, 2014 at 7:39
  • I followed the advice here and did not have to modify the $templateCache. Commented Sep 26, 2014 at 20:58

1 Answer 1

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 :)

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

Comments

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.