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

后端 未结 3 452
无人及你
无人及你 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:17

    Add angular-route into application.js like

    in /app/assets/javascripts/application.js

    //= require angular
    //= require angular-resource
    //= require angular-route
    

提交回复
热议问题