import { LoadingService } from '@farris/ui-loading'; import { Subject } from 'rxjs/Subject'; import { Observable } from 'rxjs/Observable'; import { Component, Renderer2, TemplateRef, ViewChild, ComponentFactoryResolver, Injector, ComponentRef, ElementRef } from '@angular/core'; import { BsModalService } from '../../../../../projects/modal/src/public-api'; import { MessagerService } from '../../../../../projects/messager/src/public-api'; import { BsModalRef } from '../../../../../projects/modal/src/public-api'; import { DialogContentComponent } from './dialog-content.component'; import { of } from 'rxjs/observable/of'; @Component({ selector: 'app-dialog-demo', templateUrl: `./dialog-demo.component.html` }) export class DialogDemoComponent { showInfoMsg() { this.msgService.info(`登录失败,请检查用户名或密码是否正确!登录失败,请检查用户名或密码是否正确!登录失败,请检查用户名或密码是否正确!登录失败, 请检查用户名或密码是否正确!登录失败,请检查用户名或密码是否正确!登录失败,请检查用户名或密码是否正确!登录失败,请检查用户名或密码是否正确!登录失败,请检查用户名或密码是否正确! 登录失败,请检查用户名或密码是否正确!登录失败,请检查用户名或密码是否正确!登录失败,请检查用户名或密码是否正确!登录失败,请检查用户名或密码是否正确!`, () => { alert('Callback Function.'); }); } showErrorMsg() { this.msgService.error('登录失败,请检查用户名或密码是否正确!'); } showWarningMsg() { this.msgService.warning('登录失败,请检查用户名或密码是否正确!'); } showQuestiongMsg() { this.msgService.question('登录失败,请检查用户名或密码是否正确!', () => { this.showInfoMsg(); }); } }