angular2如何在加载页面时打开ng zorro消息框
我在我的项目中添加了消息框,我想知道如何在页面加载时打开该消息框,而不使用单击事件 代码在这里 commonlayout.htmlangular2如何在加载页面时打开ng zorro消息框,angular,typescript,ng-zorro-antd,Angular,Typescript,Ng Zorro Antd,我在我的项目中添加了消息框,我想知道如何在页面加载时打开该消息框,而不使用单击事件 代码在这里 commonlayout.html <router-outlet (load)="createBasicNotification()"> </router-outlet> 我解决了这个问题 我将ngOnInit添加到 `ngOnInit() { `this.createBasicNotification() ; true;`}` `ng
<router-outlet (load)="createBasicNotification()">
</router-outlet>
我解决了这个问题
我将ngOnInit
添加到
`ngOnInit() { `this.createBasicNotification() ; true;`}`
`ngOnInit() { `this.createBasicNotification() ; true;`}`