Created
June 14, 2016 16:50
-
-
Save GabrielGil/0e2428610decfb10f8ab0ee5e0a5f0dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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