本文整理匯總了TypeScript中ngx-bootstrap.BsModalService.show方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript BsModalService.show方法的具體用法?TypeScript BsModalService.show怎麽用?TypeScript BsModalService.show使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ngx-bootstrap.BsModalService
的用法示例。
在下文中一共展示了BsModalService.show方法的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);
}