diff --git a/src/modal/modal-trigger.js b/src/modal/modal-trigger.js index b95fe28a..eaa838cc 100644 --- a/src/modal/modal-trigger.js +++ b/src/modal/modal-trigger.js @@ -1,11 +1,14 @@ -import { customAttribute } from 'aurelia-templating'; +import { bindable, customAttribute } from 'aurelia-templating'; import { inject } from 'aurelia-dependency-injection'; +import { getBooleanFromAttributeValue } from '../common/attributes'; import { AttributeManager } from '../common/attributeManager'; import { fireMaterializeEvent } from '../common/events'; @customAttribute('md-modal-trigger') @inject(Element) export class MdModalTrigger { + @bindable() dismissible = true; + constructor(element) { this.element = element; this.attributeManager = new AttributeManager(this.element); @@ -15,7 +18,8 @@ export class MdModalTrigger { attached() { this.attributeManager.addClasses('modal-trigger'); $(this.element).leanModal({ - complete: this.onComplete + complete: this.onComplete, + dismissible: getBooleanFromAttributeValue(this.dismissible) }); }