ng build --prod發(fā)布內(nèi)容訪問時提示:提示ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'resolveComponentFactory' of undefinedzz查找錯誤發(fā)現(xiàn)是NzMessageService 在injector時發(fā)生的錯誤。部分代碼 constructor(protected injector: Injector, public componentConfig: BaseComponentConfig, protected systemFormControl: ArSystemFormControl = null) { // 注入服務(wù)組件等
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);有人遇到同樣的錯誤么?我盡量查找解決辦法但是沒有找到。
ng-zorro:發(fā)布后,inject NzMessageService 內(nèi)容出錯。
當(dāng)年話下
2018-08-23 17:23:06