Skip to content

Instantly share code, notes, and snippets.

@scottsword
Created January 28, 2016 18:42
Show Gist options
  • Save scottsword/32ec9888fea7dae67dc9 to your computer and use it in GitHub Desktop.
Save scottsword/32ec9888fea7dae67dc9 to your computer and use it in GitHub Desktop.
$urlRouterProvider.otherwise('/');
$stateProvider
.state('dashboard', {
url: '/',
templateUrl: 'dashboard-app/dashboard.html?cache-bust="' + cacheBusterProvider.tag() + '"',
controller: 'DashboardController',
controllerAs: 'vm',
resolve: {
data: function(authService) {
return authService.isLoggedin().then(authService.isPathAuthorized);
}
}
})
.state('dashboardCandidates', {
url: '/my/candidates',
templateUrl: 'dashboard-app/candidates.html?cache-bust="' + cacheBusterProvider.tag() + '"',
controller: 'DashboardController',
controllerAs: 'vm',
resolve: {
data: function(authService) {
return authService.isLoggedin().then(authService.isPathAuthorized);
}
}
})
.state('dashboardCompanies', {
url: '/my/companies',
templateUrl: 'dashboard-app/companies.html?cache-bust="' + cacheBusterProvider.tag() + '"',
controller: 'DashboardController',
controllerAs: 'vm',
resolve: {
data: function(authService) {
return authService.isLoggedin().then(authService.isPathAuthorized);
}
}
})
.state('dashboardFiles', {
url: '/my/files',
templateUrl: 'dashboard-app/files.html?cache-bust="' + cacheBusterProvider.tag() + '"',
controller: 'DashboardController',
controllerAs: 'vm',
resolve: {
data: function(authService) {
return authService.isLoggedin().then(authService.isPathAuthorized);
}
}
})
.state('dashboardTags', {
url: '/my/tags',
templateUrl: 'dashboard-app/tags.html?cache-bust="' + cacheBusterProvider.tag() + '"',
controller: 'DashboardController',
controllerAs: 'vm',
resolve: {
data: function(authService) {
return authService.isLoggedin().then(authService.isPathAuthorized);
}
}
});
$stateProvider
.state('profileUser', {
url: '/:userId',
templateUrl: 'profile-user-app/profile-user.html?cache-bust="' + cacheBusterProvider.tag() + '"',
controller: 'ProfileUserController',
controllerAs: 'vm',
reloadOnSearch: false,
resolve: {
data: function(authService) {
return authService.isLoggedin().then(authService.isPathAuthorized);
}
}
})
.state('profileUser.activity', {
url: '',
templateUrl: 'profile-user-app/partials/activity.html?cache-bust="' + cacheBusterProvider.tag() + '"'
})
.state('profileUser.info', {
url: '/info',
templateUrl: 'profile-user-app/partials/info.html?cache-bust="' + cacheBusterProvider.tag() + '"'
})
.state('profileUser.intake', {
url: '/intake',
templateUrl: 'profile-user-app/partials/intake.html?cache-bust="' + cacheBusterProvider.tag() + '"',
onExit: function() {
angular.element(window).unbind('scroll.intake');
}
})
.state('profileUser.pipeline', {
url: '/pipeline',
templateUrl: 'profile-user-app/partials/pipeline.html?cache-bust="' + cacheBusterProvider.tag() + '"'
})
.state('profileUser.docs', {
url: '/docs',
templateUrl: 'profile-user-app/partials/docs.html?cache-bust="' + cacheBusterProvider.tag() + '"'
})
.state('profileUser.maxhire', {
url: '/maxhire',
templateUrl: 'profile-user-app/partials/maxhire.html?cache-bust="' + cacheBusterProvider.tag() + '"'
});
$stateProvider
.state('orgDetail', {
url: '/organization/:orgId',
templateUrl: 'profile-org-app/profile-org.html?cache-bust="' + cacheBusterProvider.tag() + '"',
controller: 'OrganizationProfileController',
controllerAs: 'vm',
reloadOnSearch: false,
redirectTo: 'orgDetail.activity',
resolve: {
data: function(authService) {
return authService.isLoggedin().then(authService.isPathAuthorized);
}
}
})
.state('jobDetail', {
url: '/job/:jobId',
templateUrl: 'profile-org-app/profile-org.html?cache-bust="' + cacheBusterProvider.tag() + '"',
controller: 'OrganizationProfileController',
controllerAs: 'vm',
reloadOnSearch: false,
redirectTo: 'jobDetail.activity',
resolve: {
data: function(authService) {
return authService.isLoggedin().then(authService.isPathAuthorized);
}
}
})
.state('jobEdit', {
url: '/job/edit/:jobId',
templateUrl: 'profile-org-app/profile-org-edit-job.html?cache-bust="' + cacheBusterProvider.tag() + '"',
controller: 'OrganizationProfileEditController',
controllerAs: 'vm',
reloadOnSearch: false,
resolve: {
data: function(authService) {
return authService.isLoggedin().then(authService.isPathAuthorized);
}
}
})
.state('orgEdit', {
url: '/organization/edit/:orgId',
templateUrl: 'profile-org-app/profile-org-edit.html?cache-bust="' + cacheBusterProvider.tag() + '"',
controller: 'OrganizationProfileEditController',
controllerAs: 'vm',
reloadOnSearch: false,
resolve: {
data: function(authService) {
return authService.isLoggedin().then(authService.isPathAuthorized);
}
}
})
.state('jobDetail.intake', {
url: '',
templateUrl: 'profile-org-app/partials/intake.html?cache-bust="' + cacheBusterProvider.tag() + '"'
})
.state('jobDetail.activity', {
url: '/activity',
templateUrl: 'profile-org-app/partials/activity.html?cache-bust="' + cacheBusterProvider.tag() + '"'
})
.state('jobDetail.pipeline', {
url: '/pipeline',
templateUrl: 'profile-org-app/partials/pipeline.html?cache-bust="' + cacheBusterProvider.tag() + '"'
})
.state('orgDetail.activity', {
url: '',
templateUrl: 'profile-org-app/partials/activity.html?cache-bust="' + cacheBusterProvider.tag() + '"'
})
.state('orgDetail.info', {
url: '/info',
templateUrl: 'profile-org-app/partials/info.html?cache-bust="' + cacheBusterProvider.tag() + '"'
})
.state('orgDetail.jobs', {
url: '/jobs',
templateUrl: 'profile-org-app/partials/jobs.html?cache-bust="' + cacheBusterProvider.tag() + '"'
})
.state('orgDetail.contacts', {
url: '/contacts',
templateUrl: 'profile-org-app/partials/contacts.html?cache-bust="' + cacheBusterProvider.tag() + '"'
})
.state('orgDetail.pipeline', {
url: '/pipeline',
templateUrl: 'profile-org-app/partials/pipeline.html?cache-bust="' + cacheBusterProvider.tag() + '"'
})
.state('orgDetail.docs', {
url: '/docs',
templateUrl: 'profile-org-app/partials/docs.html?cache-bust="' + cacheBusterProvider.tag() + '"'
})
.state('orgDetail.maxhire', {
url: '/maxhire',
templateUrl: 'profile-org-app/partials/maxhire.html?cache-bust="' + cacheBusterProvider.tag() + '"'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment