Error: [$injector:nomod] Module 'ui.bootstrap' is not available! You either misspelled […]

前端 未结 3 2008
小蘑菇
小蘑菇 2021-02-20 13:01

I am having this problem here and I haven\'t gotten any consistent solution so far looking out there. I am running a Java project with Angular on the front-end, and trying to im

相关标签:
3条回答
  • 2021-02-20 14:02

    You must load the ui.boostrap module after the angularjs file.

    0 讨论(0)
  • 2021-02-20 14:03

    Another way to install this via bower and here are the instructions.

    Add the following 2 packages to bower.json in your directory.

    "bootstrap": "*",
    "angular-bootstrap": "*",
    

    Run bower update from your directory

    Add the ui.bootstrap to angular module like below.

    Wire it in the view for the bootsrap to work

    CSS

    <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
    

    JS

    <script src="bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
    
    0 讨论(0)
  • 2021-02-20 14:03

    You have to include following after angular.min....

    <script src="..//ui-bootstrap-custom-tpls-0.12.0.min.js" type="text/javascript"></script>
    
    0 讨论(0)
提交回复
热议问题