javascript - Module 'ui.bootstrap' is not available - Angularjs -



javascript - Module 'ui.bootstrap' is not available - Angularjs -

i facing unusual problem angularjs project.

i have website - www.server.com/pwm (home page). in page there anchor tag takes me page - www.server.com/publishers. when load home page , navigate publishers page clicking anchor tag, works fine. when straight type url in browser below exceptions (eg. if load home page www.server.com/pwm , type "/publishers" @ end of url)

[$injector:nomod] module 'ui.bootstrap' not available! either misspelled module name or forgot load it. if registering module ensure specify dependencies sec argument. http://errors.angularjs.org/1.2.18/$injector/nomod?p0=ui.bootstrap"

the confusing part have included necessary libraries , works fine when navigate through webpage. problem occurs when seek straight navigate kid page. making utilize ngroute , templates load page

var pubsapp = angular.module('pubsapp', ['ngresource', 'ngroute', 'ui.bootstrap'])

and script files

<script src="/scripts/jquery-1.9.1.js" type="text/javascript"></script> <script src="/scripts/angular.js" type="text/javascript"></script> <script src="/scripts/angular-route.js" type="text/javascript"></script> <script src="/scripts/angular-sanitize.js" type="text/javascript"></script> <script src="/scripts/angular-resource.js" type="text/javascript"></script> <script src="/scripts/bootstrap.js" type="text/javascript"></script> <script src="scripts/angular-ui/ui-bootstrap.min.js" type="text/javascript"></script> <script src="scripts/angular-ui/ui-bootstrap-tpls.min.js" type="text/javascript"></script> <script src="/js/app.js" type="text/javascript"></script>

all of script tags using absolute paths (they start /) except angular-bootstrap tags; utilize relative paths. means relative wherever in browser.

your javascript files located @ www.website.com/scripts/... because of script tags except 2 utilize absolute paths, always script in same place. however, 2 angulcar-bootstrap paths in different place depending on in browser.

the reason works unless go directly kid page because angular loads javascript files on initial page load , not on navigation.

so alter angular-bootstrap script tags utilize absolute paths rest of script tags.

javascript angularjs angular-ui angular-routing

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -