本文介绍了角度2.4.x中的APP_INITIALIZER已停止工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经将APP_INITIALIZER预加载了我的配置,在我从2.0.2升级到2.4.2之前,它一直运行良好
I have APP_INITIALIZER preloading my config which was working fine till i have upgraded from 2.0.2 to 2.4.2
我是唯一遇到此问题的人?
I am the only one experiencing this problem?
providers: [
ConfigService,
{
provide: APP_INITIALIZER,
useFactory: (config:ConfigService) => () => {
return config.load();
},
deps: [ConfigService, Http],
multi: true
},
.........
config.loda()在组件和维修后变得很简单
config.loda() is getting intiilasied after componetns and servics
推荐答案
此问题已自 https://github.com/angular/angular/pull/14681 .请尝试角度2.4.9.谢谢.:)
This issue has been fixed since https://github.com/angular/angular/pull/14681. Please try angular 2.4.9. Thanks. :)
这篇关于角度2.4.x中的APP_INITIALIZER已停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!