我使用离子组合角度。但是当控制台运行项目时:' 警告:尝试多次加载角度' 详细bower.json文件:
{
"name": "HelloIonic",
"private": "true",
"dependencies": {
"angular": "^1.4.0",
"bootstrap-sass-official": "^3.2.0",
"angular-animate": "^1.4.0",
"angular-aria": "^1.4.0",
"angular-cookies": "^1.4.0",
"angular-messages": "^1.4.0",
"angular-resource": "^1.4.0",
"angular-route": "^1.4.0",
"angular-sanitize": "^1.4.0",
"angular-touch": "^1.4.0",
"angular-ui-router": "^0.2.15",
"bootstrap": "*",
"angular-bootstrap": "*",
"angular-spinner": "~0.6.1",
"angular-loading-spinner": "~0.0.3",
"satellizer": "^0.12.5",
"angular-local-storage": "^0.2.3",
"font-awesome": "~4.2.0",
"animate.css": "~3.2.0",
"angular-material": "master",
"angular-flash-alert": "~1.1.1",
"angular-utils-pagination": ""
},
"devDependencies": {
"ionic": "driftyco/ionic-bower#1.2.4"
}
}
详情app.route文件:
(function (angular) {
'use strict';
angular
.module('starter', ['ionic', 'starter.controllers'])
.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
// org.apache.cordova.statusbar required
StatusBar.styleDefault();
}
});
})
.config(['$stateProvider', '$urlRouterProvider', '$authProvider',
function ($stateProvider, $urlRouterProvider, $authProvider) {
// Satellizer configuration that specifies which API
// route the JWT should be retrieved from
$authProvider.loginUrl = 'http://103.237.145.123:8098/v1/mobile/user/login';
$stateProvider
.state('app', {
url: '/app',
abstract: true,
templateUrl: 'templates/menu.html',
controller: 'AppCtrl'
})
.state('app.search', {
url: '/search',
views: {
'menuContent': {
templateUrl: 'templates/search.html'
}
}
})
.state('app.browse', {
url: '/browse',
views: {
'menuContent': {
templateUrl: 'templates/browse.html'
}
}
})
.state('app.playlists', {
url: '/playlists',
views: {
'menuContent': {
templateUrl: 'templates/playlists.html',
controller: 'PlaylistsCtrl'
}
}
})
.state('app.single', {
url: '/playlists/:playlistId',
views: {
'menuContent': {
templateUrl: 'templates/playlist.html',
controller: 'PlaylistCtrl'
}
}
});
// if none of the above states are matched, use this as the fallback
$urlRouterProvider.otherwise('/app/search');
}]);
} (angular));