53 lines
No EOL
1.1 KiB
JavaScript
53 lines
No EOL
1.1 KiB
JavaScript
angular.module('app.routes', [])
|
|
|
|
.config(function($stateProvider, $urlRouterProvider) {
|
|
|
|
// Ionic uses AngularUI Router which uses the concept of states
|
|
// Learn more here: https://github.com/angular-ui/ui-router
|
|
// Set up the various states which the app can be in.
|
|
// Each state's controller can be found in controllers.js
|
|
$stateProvider
|
|
|
|
|
|
|
|
.state('tabsController.survey', {
|
|
url: '/page2',
|
|
views: {
|
|
'tab1': {
|
|
templateUrl: 'templates/survey.html',
|
|
controller: 'surveyCtrl'
|
|
}
|
|
}
|
|
})
|
|
|
|
.state('tabsController.results', {
|
|
url: '/page3',
|
|
views: {
|
|
'tab2': {
|
|
templateUrl: 'templates/results.html',
|
|
controller: 'resultsCtrl'
|
|
}
|
|
}
|
|
})
|
|
|
|
.state('tabsController.search', {
|
|
url: '/page4',
|
|
views: {
|
|
'tab3': {
|
|
templateUrl: 'templates/search.html',
|
|
controller: 'searchCtrl'
|
|
}
|
|
}
|
|
})
|
|
|
|
.state('tabsController', {
|
|
url: '/page1',
|
|
templateUrl: 'templates/tabsController.html',
|
|
abstract:true
|
|
})
|
|
|
|
$urlRouterProvider.otherwise('/page1/page2')
|
|
|
|
|
|
|
|
}); |