Skip to content

Instantly share code, notes, and snippets.

@lynndylanhurley
Created June 22, 2015 20:41
Show Gist options
  • Save lynndylanhurley/d77a5a6a0ff4a1681ace to your computer and use it in GitHub Desktop.
Save lynndylanhurley/d77a5a6a0ff4a1681ace to your computer and use it in GitHub Desktop.
### chain modals ###
$genericModal.show({
tmplName: 'some-list-of-actions-that-uses-the-current-controller-scope.html'
scope: $scope
close: 'Reject Button Text'
confirm: 'Resolve Button Text'
# to show another modal on confirmation, pass a 'resolve' option with another `show` function
resolve: ->
# to simply close the modal after dismisal , don't provide resolve / reject functions
$genericModal.show({
tmplName: 'some-success-template.html'
dismiss: 'K thx'
})
# to show another modal on rejection, pass a 'reject' option with another `show` function
reject: ->
# to simply close the modal after dismisal , don't provide resolve / reject functions
$genericModal.show({
tmplName: 'some-dismiss-notification.html'
dismiss: 'Aight'
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment