Last active
May 27, 2016 22:44
-
-
Save kevana/8e3ec69171555bdc2dbbc3e8bc662003 to your computer and use it in GitHub Desktop.
API example for new modal manager
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
const viewModel = { | |
name: 'John', | |
credit: false, | |
} | |
const [openModal, closeModal] = modalManager.fire({ content: '#foo-tmpl', viewModel }) | |
openModal | |
.then(() => console.log('modal opened')) | |
closeModal | |
.then((val) => console.log('modal closed, resolved with value', val)) |
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
const viewModel = { | |
name: 'John', | |
credit: false, | |
} | |
sitemodal.fire({ content: '#foo-tmpl', viewModel }, | |
() => console.log('modal opened'), | |
() => console.log('modal closed, no return value') | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment