Skip to content

Instantly share code, notes, and snippets.

@mzarella

mzarella/app.js Secret

Created February 11, 2015 00:43
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 mzarella/4078e1ea38199d6d6a28 to your computer and use it in GitHub Desktop.
Save mzarella/4078e1ea38199d6d6a28 to your computer and use it in GitHub Desktop.
.state('app.favorites', {
url: "/favorites",
views: {
'menuContent': {
templateUrl: "templates/favorites.html",
controller: 'FavoritesCtrl'
}
},
resolve: {
favorites: function(FavsService){
return FavsService.getFavs()
}
}
})
.state('app.favorite', {
url: "/favorites/:favoriteId",
views: {
'menuContent': {
templateUrl: "templates/favorite.html",
controller: 'FavoriteCtrl'
}
},
resolve: {
art: function($stateParams, FavsService){
return FavsService.getFav($stateParams.favoriteId)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment