Skip to content

Instantly share code, notes, and snippets.

@pbedat
Last active August 29, 2015 14:03
Show Gist options
  • Select an option

  • Save pbedat/301725098f33d3d48298 to your computer and use it in GitHub Desktop.

Select an option

Save pbedat/301725098f33d3d48298 to your computer and use it in GitHub Desktop.
$stateProvider.state("wf", {
resolve: {
waitForLogin: function(UserModel){
return UserModel.isLoggedIn();
}
}
}).state("wf.employee", {
abstract: true,
url: "employees/:id",
resolve: {
employee: function(waitForLogin, EmployeeModel, $stateParams){
return EmployeeModel.get($stateParams.id);
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment