Angularjs: [$injector:modulerr] Failed To Instantiate Module Ui-router
I'm a relative newbie in Angular and after following the tutorial I now want to build something from scratch on my own. So I'm trying to set up a basic app in which I want to use t
Solution 1:
You are trying to use $stateProvider and $urlRouterProvider which are coming from "ui.router", and you didn't inject the dependency "ui.router".
var formApp = angular.module('formApp', ['ui.router']);
That's the error you got, please have a read of https://docs.angularjs.org/guide/di .
Solution 2:
You've got this error because you're injecting ui-router
instead of ui.router
Replace this line in your code :
varformApp= angular.module('formApp', ['ui-router']);
With this one :
varformApp= angular.module('formApp', ['ui.router']);
And this will work flawlessly
This is a common mistake with this library as its name is ui-router but you have to inject ui.router instead ;)
Post a Comment for "Angularjs: [$injector:modulerr] Failed To Instantiate Module Ui-router"