Skip to content

Instantly share code, notes, and snippets.

@BenMagyar
Last active August 29, 2015 14:04
Show Gist options
  • Save BenMagyar/2ee6691757e015185724 to your computer and use it in GitHub Desktop.
Save BenMagyar/2ee6691757e015185724 to your computer and use it in GitHub Desktop.
var app = angular.module('app', [
'ui.router',
'app.MyModule'
]);
// State provider from original app.js
app.config(function($stateProvider, $urlRouterProvider){
$urlRouterProvider.otherwise('/');
$stateProvider
// INDEX
.state('index', {
url: '/',
templateUrl: '/templates/index.tmpl.html'
})
});
// States for MyModule -- these are concatenated together by grunt
angular.module('app.MyModule', ['ui.router']).config(
['$stateProvider'], function($stateProvider){
$stateProvider
.state('MyModuleStateOne',{
url: '/MyModuleStateOneURL',
templateUrl: '/MyModule/MyModule.tmpl.html'
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment