AngularJS ng-view not working

后端 未结 3 810
渐次进展
渐次进展 2021-01-12 22:24

So I followed this guide: http://viralpatel.net/blogs/angularjs-routing-and-views-tutorial-with-example/

But when I try to change the view nothing happens, anybody a

3条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-12 23:06

    From angular 1.2.0, ngRoute has been moved to its own module. You have to load it separately and declare the dependency.

    Update your html:

    
    
    

    And Js:

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

    For more information: http://docs.angularjs.org/guide/migration

提交回复
热议问题