Skip to content

Instantly share code, notes, and snippets.

@benschw
Created May 4, 2013 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benschw/5518413 to your computer and use it in GitHub Desktop.
Save benschw/5518413 to your computer and use it in GitHub Desktop.
Target views relatively or absolutely with AngularJS ui-router
$stateProvider
.state('contacts.detail', {
views: {
// relatively targets the "info" view in "contacts.detail" state:
"info" : { /* ... */ }
// relatively targets the unnamed view in "contacts.detail" state:
"" : { /* ... */ }
// absolutely targets the "detail" view in parent "contacts" state:
"detail@contacts" : { /* ... */ }
// absolutely targets the unnamed view in parent "contacts" state:
"@contacts" : { /* ... */ }
// absolutely targets the "status" view in root unnamed state:
"status@" : { /* ... */ }
// absolutely targets the unnamed view in root unnamed state:
"@" : { /* ... */ }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment