angular5给懒加载模块添加loading时间:2023-03-10 07:16:11 在根组件的构造函数中直接执行: this.router.events.subscribe(event=>{ if(event instanceof RouteConfigLoadEnd) { this.toast.hide(); } if(event instanceof RouteConfigLoadStart) { this.toast.loading(); } });