Wajihurrehman
Wajihurrehman

Reputation: 567

Uncaught Error: No module: ngRoute

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) {

});

Upvotes: 7

Views: 18777

Answers (2)

cafonso
cafonso

Reputation: 909

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'>

Upvotes: 14

Wottensprels
Wottensprels

Reputation: 3327

As of AngularJS 1.2.0, ngRoute is separated in its own module.

Download: http://code.angularjs.org/1.2.1/

Changelog: https://github.com/angular/angular.js/blob/master/CHANGELOG.md

Upvotes: 6

Related Questions