本文整理汇总了TypeScript中ngx-bootstrap.BsModalService类的典型用法代码示例。如果您正苦于以下问题:TypeScript BsModalService类的具体用法?TypeScript BsModalService怎么用?TypeScript BsModalService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BsModalService类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: destroy
/**
* Destroy the task
*
* @param {TaskDefinition} taskDefinition
*/
destroy(taskDefinition: TaskDefinition) {
this.loggerService.log(`Destroy ${taskDefinition.name} task definition.`, taskDefinition.name);
this.modal = this.modalService.show(TaskDefinitionsDestroyComponent, { class: 'modal-md' });
this.modal.content.open({ taskDefinitions: [taskDefinition] }).subscribe(() => {
this.router.navigate([`/tasks/definitions`]);
});
}
示例2: destroy
/**
* Destroy the stream
*
* @param {StreamDefinition} streamDefinition
*/
destroy(streamDefinition: StreamDefinition) {
this.loggerService.log(`Destroy ${name} stream definition.`, name);
this.modal = this.modalService.show(StreamsDestroyComponent, { class: 'modal-md' });
this.modal.content.open({ streamDefinitions: [streamDefinition] }).subscribe(() => {
this.cancel();
});
}
示例3: destroy
/**
* Destroy the task schedule
*
* @param {TaskSchedule} taskSchedule
*/
destroy(taskSchedule: TaskSchedule) {
this.loggerService.log(`Destroy ${taskSchedule.name} task schedule.`, taskSchedule.name);
this.modal = this.modalService.show(TaskSchedulesDestroyComponent, { class: 'modal-md' });
this.modal.content.open({ taskSchedules: [taskSchedule] }).subscribe(() => {
this.cancel();
});
}
示例4: selectTemplate
private selectTemplate(templates: Array<{ name: string, description: string }>) {
this.modalService.show(AddSubmModalComponent, {
initialState: {
templates: templates,
onOk: (project: string) => this.onOk(project)
}
});
}
示例5: open
/**
* Used to display a confirm modal
*
* this.confirmService.open(`Title`, `Description`).subscribe(() => {
* // Success code
* })
*
* @param {string} title
* @param {string} description
* @param {any} options
* @returns {Observable<any>} Confirm observable
*/
open(title: string, description: string, options: any = {}): Observable<any> {
this.bsModalConfirm = this.modalService.show(ConfirmComponent, {ignoreBackdropClick: true});
this.bsModalConfirm.content.title = title;
this.bsModalConfirm.content.description = description;
if (options.confirm) {
this.bsModalConfirm.content.buttonConfirm = options.confirm;
}
if (options.cancel) {
this.bsModalConfirm.content.buttonCancel = options.cancel;
}
return this.bsModalConfirm.content.confirm;
}
示例6: openAboutModal
openAboutModal() {
this.modalRef = this.modalService.show(AboutComponent);
}