Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 未处理的承诺拒绝:模板分析错误:';ng模板';不是已知元素_Angular_Angular Promise_Ng Template - Fatal编程技术网

Angular 未处理的承诺拒绝:模板分析错误:';ng模板';不是已知元素

Angular 未处理的承诺拒绝:模板分析错误:';ng模板';不是已知元素,angular,angular-promise,ng-template,Angular,Angular Promise,Ng Template,使用“npm安装”更新Angular2应用程序并使用“npm启动”启动服务器后,我收到此错误 Unhandled Promise rejection: Template parse errors: 'ng-template' is not a known element: 1. If 'ng-template' is an Angular component, then verify that it is part of this module. 2. If 'ng-template' is

使用“npm安装”更新Angular2应用程序并使用“npm启动”启动服务器后,我收到此错误

Unhandled Promise rejection: Template parse errors:
'ng-template' is not a known element:
1. If 'ng-template' is an Angular component, then verify that it is 
part of this module.
2. If 'ng-template' is a Web Component then add 
"CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component 
to suppress this message. ("[ERROR ->]<ng-template> <div class="mat-
autocomplete-panel" role="listbox" [id]="id" 
[ngClass]="_getClassList()"): MdAutocomplete@0:0 ; Zone: <root> ; 
Task: Promise.then ; Value:
未处理的承诺拒绝:模板分析错误:
“ng模板”不是已知元素:
1.如果“ng模板”是角度组件,则验证它是否为角度组件
本模块的一部分。
2.如果“ng模板”是Web组件,则添加
“自定义元素\u架构”添加到此组件的“@NgModule.schemas”

以抑制此消息。(“[错误->]您能否共享导致错误的代码?如果您使用
ng模板
请尝试改用
ng容器
?但请共享代码。我不确定是哪个组件导致问题。我认为在“npm安装”后,某些依赖项会转换为angular4@tschaka1904我可以知道为什么吗?我的意思是说为什么不使用
ng模板
?这可能有助于: