Solve the UI Bootstrap modal error: Failed to load template

Are you getting the following error when attempting to use a UI Bootstrap modal dialog in your AngularJS project?

Failed to load template: template/modal/backdrop.html

Make sure you're linking to the UI Bootstrap library with the templates included (i.e. ui-bootstrap-tpls.js) and not the plain UI Bootstrap library (i.e. ui-bootstrap.js).

<script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.10.0.js"></script>

UI Bootstrap not loading in AngularJS

If you're adding UI Bootstrap to your AngularJS project, and you're getting an "angular is not defined" and/or "Failed to instantiate module ui.bootstrap" error, make sure you are including the ui-bootstrap.js script file after the angular.js script file in your html.

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.10.0/ui-bootstrap.js"></script>