在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML5  網絡安全/ ng-zorro:發(fā)布后,inject NzMessageService 內容出

ng-zorro:發(fā)布后,inject NzMessageService 內容出錯。

ng build --prod

發(fā)布內容訪問時提示:

提示ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'resolveComponentFactory' of undefinedzz

查找錯誤發(fā)現是NzMessageService 在injector時發(fā)生的錯誤。

部分代碼

 constructor(protected injector: Injector,
    public componentConfig: BaseComponentConfig,
    protected systemFormControl: ArSystemFormControl = null) {
    // 注入服務組件等
    this.httpService = this.injector.get(HttpService);
    this.message = this.injector.get(NzMessageService);
    this.fb = this.injector.get(FormBuilder);
    this.nzModalService = this.injector.get(NzModalService);
    console.log(this.nzModalService);
    this.route = this.injector.get(ActivatedRoute);
    this.router = this.injector.get(Router);
    this.nghttp = this.injector.get(HttpClient);
    this.validateForm = this.fb.group({});
    this.location = this.injector.get(Location);

有人遇到同樣的錯誤么?我盡量查找解決辦法但是沒有找到。

回答
編輯回答
耍太極

我遇到同樣的

2018年3月21日 19:53
編輯回答
安若晴

這個問題你解決了沒,現在我也遇到了相同的

2017年12月21日 03:22