AngularJS application config “Uncaught object” error (ngRoute)

后端 未结 4 1559
故里飘歌
故里飘歌 2020-12-11 04:26

I have this simple page:



    
        
        

        
4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-11 04:42

    In v1.2+, ngRoute is a separate module and should be loaded independently (and also declared as a dependency of your main module).

    
    
    
    var betsApp = angular.module('betsApp', ['ngRoute']);
    

    If you are using bower, you can download the ngRoute module with the following command:
    bower install angular-route

提交回复
热议问题