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

25 lines
696 B
JavaScript

import ngModule from '../../module';
import Dialog from '../dialog/dialog';
import template from './confirm.html';
export default class Confirm extends Dialog {
constructor($element, $scope, $compile) {
super($element);
let cTemplate = $compile(template)($scope)[0];
this.body = cTemplate.querySelector('tpl-body');
this.buttons = cTemplate.querySelector('tpl-buttons');
}
}
Confirm.$inject = ['$element', '$scope', '$compile'];
ngModule.component('vnConfirm', {
template: require('../dialog/dialog.html'),
bindings: {
onOpen: '&?',
onResponse: '&',
question: '@',
message: '@?'
},
controller: Confirm
});