Error: No module: ngRoute when trying to implement routing in angularjs

后端 未结 3 482
无人及你
无人及你 2021-01-11 10:48
app = angular.module(\"dithat\", [\"ngRoute\", \"ngResource\", \'ng-rails-csrf\']);
  app.config([\'$routeProvider\',
  function($routeProvider) {
  $routeProvider.
         


        
3条回答
  •  感动是毒
    2021-01-11 11:35

    Have you included the angular-route.js file in your page? And are you using angular 1.2.0 - the module doesn't seem to exist prior to this.

    See http://docs.angularjs.org/api/ngRoute

提交回复
热议问题