salix/front/core/components/confirm/confirm.js

28 lines
790 B
JavaScript
Raw Normal View History

2018-02-10 15:18:01 +00:00
import ngModule from '../../module';
2019-10-26 23:30:01 +00:00
import Dialog from '../dialog';
import template from './confirm.html';
export default class Confirm extends Dialog {
2019-10-26 23:30:01 +00:00
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);
}
}
2019-10-26 23:30:01 +00:00
ngModule.vnComponent('vnConfirm', {
controller: Confirm,
transclude: true,
bindings: {
2017-02-07 16:38:30 +00:00
question: '@',
message: '@?'
2019-10-26 23:30:01 +00:00
}
});