0
UIからトリガーされたイベントが発生したときにダイアログを開こうとしています。私はhtmlでボタンをクリックしてみましたが動作していますが、コンポーネントから開く方法はわかりません。私はUIをクリックするとコンポーネントからのダイアログのshow()イベントのトリガー
HTML
<button (click)="cm.show()">ADD</button>
<dialog class="mdl-dialog" #cm="dialog">
<div class="wpr">
<span (click)="cm.close()" class="close hairline"></span>
</div>
<div>
content...
</div>
</dialog>
コンポーネントは
import { Component, OnInit } from '@angular/core';
import { DialogComponent } from '../../dialog/dialog';
@Component({
selector: 'test-app',
templateUrl: 'test.component.html',
directives: [
DialogComponent
]
})
export class TestComponent implements OnInit {
constructor() { }
ngOnInit() {
this.callCalendar();
}
callCalendar() {
this.$calendar.fullCalendar({
editable: true,
disableResizing: true,
header: {
right: 'month, agendaWeek, agendaDay',
center: 'title',
left: 'today prev next '
},
eventClick: function (calEvent: any, jsEvent: any, view: any) {
console.log("calEvent called....", calEvent);
// here I want to open a popup
}
});
}
}
それは、eventClick機能をトリガします。ここでは、ポップアップウィンドウを開きたいと思います。
私を助けてください。
私の回答は役に立ちましたか?もしそうなら、それを親切に受け入れるでしょうか? – rinukkusu