28 lines
790 B
JavaScript
28 lines
790 B
JavaScript
import ngModule from '../../module';
|
|
import Dialog from '../dialog';
|
|
import template from './confirm.html';
|
|
|
|
export default class Confirm extends Dialog {
|
|
constructor($element, $, $transclude) {
|
|
super($element, $, $transclude);
|
|
|
|
let $template = angular.element(template);
|
|
let slots = $transclude.$$boundTransclude.$$slots;
|
|
|
|
let bodyLinkFn = this.$compile($template.find('tpl-body'));
|
|
slots.body = this.createBoundTranscludeFn(bodyLinkFn);
|
|
|
|
let buttonsLinkFn = this.$compile($template.find('tpl-buttons'));
|
|
slots.buttons = this.createBoundTranscludeFn(buttonsLinkFn);
|
|
}
|
|
}
|
|
|
|
ngModule.vnComponent('vnConfirm', {
|
|
controller: Confirm,
|
|
transclude: true,
|
|
bindings: {
|
|
question: '@',
|
|
message: '@?'
|
|
}
|
|
});
|