Skip to content

Commit

Permalink
Step 1.4: Add initial routes
Browse files Browse the repository at this point in the history
  • Loading branch information
DAB0mB authored and Dotan Simha committed Nov 23, 2016
1 parent 7248900 commit 59ff6c8
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions client/scripts/routes.js
@@ -0,0 +1,27 @@
import { Config } from 'angular-ecmascript/module-helpers';

import chatsTemplateUrl from '../templates/chats.html';
import tabsTemplateUrl from '../templates/tabs.html';

export default class RoutesConfig extends Config {
configure() {
this.$stateProvider
.state('tab', {
url: '/tab',
abstract: true,
templateUrl: tabsTemplateUrl
})
.state('tab.chats', {
url: '/chats',
views: {
'tab-chats': {
templateUrl: chatsTemplateUrl
}
}
});

this.$urlRouterProvider.otherwise('tab/chats');
}
}

RoutesConfig.$inject = ['$stateProvider', '$urlRouterProvider'];

0 comments on commit 59ff6c8

Please sign in to comment.