Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save GabrielGil/0e2428610decfb10f8ab0ee5e0a5f0dc to your computer and use it in GitHub Desktop.
Save GabrielGil/0e2428610decfb10f8ab0ee5e0a5f0dc to your computer and use it in GitHub Desktop.
.config(function($stateProvider) {
$stateProvider.state('books.single.content.chapter.page', {
url: '/page/{pageId:int}',
resolve: {
Page: function(Chapter, $stateParams) {
return Chapter.one('pages', $stateParams.pageId).get()
}
},
onEnter: function(Page, Restangular, $document, $state, $mdDialog) {
//console.log("Entering state", Chapter.one('pages', $stateParams.pageId).get())
$mdDialog.show({
fullscreen: true,
parent: $document.body,
templateUrl: "books/single/content/chapter/edit-page/editPageDialog.tpl.html",
locals: {
Page: Page,
Layout: Restangular.all('pages').one('layouts', Page.page_layout_id).get()
},
controller: 'BookSingleContentChapterPageController',
})
}
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment