Skip to content

Instantly share code, notes, and snippets.

@charandas
Last active August 29, 2015 14:02
Show Gist options
  • Save charandas/16f2a5552c2b419002ae to your computer and use it in GitHub Desktop.
Save charandas/16f2a5552c2b419002ae to your computer and use it in GitHub Desktop.
root controller routes
define([
'angularUiRouter',
'core/modules/states/a',
'core/modules/states/b',
'core/controllers/home',
'core/controllers/logs',
'core/services/settings'
], function() {
'use strict';
angular.module('core.states.app', [
'ui.router',
'core.states.a',
'core.states.b',
]).config([
'$stateProvider',
'$urlRouterProvider',
'$urlMatcherFactoryProvider',
function($stateProvider,
$urlRouterProvider,
$urlMatcherFactoryProvider) {
// For any unmatched url, redirect to /
$urlRouterProvider.otherwise('/');
$stateProvider
.state('app', {
abstract: true,
templateUrl: 'views/app.html',
controller: 'AppCtrl',
resolve: {
settings: function(SettingsService) {
return SettingsService.get().$promise;
}
}
})
]);
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment