未捕获的错误:无模块:ngRoute [英] Uncaught Error: No module: ngRoute
本文介绍了未捕获的错误:无模块:ngRoute的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用ngRoute模块,但它显示我错误所以有额外的文件需要添加使用此模块我搜索,但我did'nt发现像其他模块国土资源,饼干我们需要单独的文件是它ngroute如果还是让我在哪里可以找到这种
错误: -
未捕获的错误:无模块:ngRoute
变种应用程式= angular.module('inventoryApp',['ngCookies','ngResource','ngRoute']);
controller.js
app.controller('storesController',函数($ rootScope,$范围,$位置$饼干,$ routeParams){});
解决方案
您确实需要一个单独的文件。请参阅:
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'>
这篇关于未捕获的错误:无模块:ngRoute的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文