I am trying to use angular ui-router in my web application, but I have a problem. Here is the application directory:
test-app
| _ bower-component
| _ app
| _ views
| _ index.html
| _ scripts
| _ app.js
and app.js :
angular
.module ('testApp', [
'ngAnimate',
'ngAria',
'ngCookies',
'ngMessages',
'ngResource',
'ui.router',
'ngSanitize',
'ngTouch'
])
.config (['$ stateProvider', '$ urlRouterProvider', function ($ stateProvider, $ urlRouterProvider) {
$ urlRouterProvider.otherwise ('/');
$ stateProvider
.state ('home', {
url: '/',
templateUrl: 'index.html',
controller: 'MainCtrl'
})
.
.
.
But when I run the application, I get this error on the console:
WARNING: Tried to load angular more than once
source share