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

25 lines
696 B
JavaScript
Raw Normal View History

2018-02-10 15:18:01 +00:00
import ngModule from '../../module';
2017-05-31 07:46:05 +00:00
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'];
2018-02-10 15:18:01 +00:00
ngModule.component('vnConfirm', {
template: require('../dialog/dialog.html'),
bindings: {
onOpen: '&?',
onResponse: '&',
2017-02-07 16:38:30 +00:00
question: '@',
message: '@?'
},
controller: Confirm
});