未捕获的错误:无模块:ngRoute模块、错误、ngRoute

由网友(我不是限量版而是绝版i)分享简介:我使用ngRoute模块,但它显示我错误所以有额外的文件需要添加使用此模块我搜索,但我did'nt发现像其他模块国土资源,饼干我们需要单独的文件是它ngroute如果还是让我在哪里可以找到这种 错误: - 未捕获的错误:无模块:ngRoute变种应用程式= angular.module('inventoryApp...

我使用ngRoute模块,但它显示我错误所以有额外的文件需要添加使用此模块我搜索,但我did'nt发现像其他模块国土资源,饼干我们需要单独的文件是它ngroute如果还是让我在哪里可以找到这种

错误: -

 未捕获的错误:无模块:ngRoute变种应用程式= angular.module('inventoryApp',['ngCookies','ngResource','ngRoute']); 

controller.js

  app.controller('storesController',函数($ rootScope,$范围,$位置$饼干,$ routeParams){}); 

解决方案 请教AngularJS的ngRoute问题 为何这段程序无法执行 问题出在哪

您确实需要一个单独的文件。请参阅:

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

  

首先包括角route.js在你的HTML:

 <脚本的src ='angular.js'><脚本的src ='角route.js'> 

i am using ngRoute module but its showing me error so is there extra file need to add for using this module i search but i did'nt found like other modules resourse,cookies we need seperate files for is it for ngroute also if yes so where can i found this

Error:-

Uncaught Error: No module: ngRoute 
var app = angular.module('inventoryApp', ['ngCookies','ngResource', 'ngRoute']);

controller.js

app.controller('storesController', function ($rootScope, $scope, $location, $cookies, $routeParams) {

});

解决方案

You do need a separate file. Please see:

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

First include angular-route.js in your HTML:

<script src='angular.js'>
<script src='angular-route.js'>

阅读全文

相关推荐

最新文章