Created
August 25, 2013 19:56
-
-
Save mnutt/6335921 to your computer and use it in GitHub Desktop.
Ember Modal Component test. The component takes a 'title' property and generates a button. When you click the button, it creates a dynamic child view appended to the body yielding whatever content was passed into the component block.
This file contains hidden or 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
ModalPopupComponent = Em.Component.extend | |
showModal: -> | |
@createChildView(Em.View, | |
classNames: ['modal-popup-container'] | |
controller: @_parentView.get('controller') | |
context: @_parentView.get('context') | |
template: @get('template') | |
templateData: { keywords: @_parentView.cloneKeywords() } | |
popupHide: -> @remove() | |
isModal: true | |
).append() | |
export default ModalPopupComponent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment