Session 无法生成显示“的解决方案”;没有带“的指令;exportAs";设置为";bs modal";(“路由器出口”<;/router outlet>;
我使用的是angular 7 bootstrap 4。我需要用模型弹出窗口显示会话超时 运行时我写的一切都很好吗?我的错误率低于正常值 我的应用程序组件.htmlSession 无法生成显示“的解决方案”;没有带“的指令;exportAs";设置为";bs modal";(“路由器出口”<;/router outlet>;,session,bootstrap-4,model,angular7,popupwindow,Session,Bootstrap 4,Model,Angular7,Popupwindow,我使用的是angular 7 bootstrap 4。我需要用模型弹出窗口显示会话超时 运行时我写的一切都很好吗?我的错误率低于正常值 我的应用程序组件.html <router-outlet></router-outlet> <div bsModal #childModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="dialog-child-nam
<router-outlet></router-outlet>
<div bsModal #childModal="bs-modal" class="modal fade" tabindex="-1"
role="dialog" aria-labelledby="dialog-child-name">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<h4 id="dialog-child-name" class="modal-title pull-left">You Have Been Idle!</h4>
<button type="button" class="close pull-right" aria-label="Close" (click)="hideChildModal()">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
{{idleState}}
<div class="row mrgbtm">
<div class="col-md-6">
<button type="button" (click)="logout()" class="btn btn-danger">Logout</button>
</div>
<div class="col-md-6">
<button type="button" (click)="stay()" class="btn btn-success">Stay</button>
</div>
</div>
</div>
</div>
</div>
</div>
恳请您向我推荐这个import ModalModule.forRoot()的解决方案,该解决方案位于app.module.ts的imports数组中。希望它能起作用
import { Component, OnInit, OnDestroy, ViewChild } from '@angular/core';
import { Subscription } from 'rxjs';
import { Router, NavigationEnd } from '@angular/router';
import { filter } from 'rxjs/operators';
import { Idle, DEFAULT_INTERRUPTSOURCES } from '@ng-idle/core';
import { Keepalive } from '@ng-idle/keepalive';
import { BsModalService } from 'ngx-bootstrap/modal';
import { BsModalRef } from 'ngx-bootstrap/modal';
import { ModalDirective } from 'ngx-bootstrap/modal';
import { AppService } from './shared/services/AppService';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent implements OnInit, OnDestroy {
@ViewChild('childModal', { static: false }) childModal: ModalDirective;
........
.......
}