I try to use angular ui-router in my web app but I have problem. Here is the app directory:
test-app
|_ bower-component
|_ app
|_ views
|_ index.html
|_ scripts
|_ app.js
and in 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 app, I get this error on console:
WARNING: Tried to load angular more than once
templateUrl: 'home.html'