Leon Gaban
Leon Gaban

Reputation: 39044

Getting error when trying to inject 'ui.router'

I'm trying to use the $stateProvider in Angular to load in partial modules on a certain view. However I can't get past the first step, which is injecting 'ui.router'

var app = angular.module('app-training', ['ui.router']);

http://tinyurl.com/m5hsfr8

Failed to instantiate module portalExchange due to: Error: [$injector:modulerr]

Upvotes: 0

Views: 181

Answers (1)

Dima Grossman
Dima Grossman

Reputation: 2830

You must include the ui.router file to your index.html after the AngularJS library. In the last versions of angular the Google team separated the ng-router to a separate module to alow users choose between ng-router and ui-router. I do believe that in the next releases the ui.router will be default.

Upvotes: 1

Related Questions