我有一个使用Angular 9的项目,该项目具有一个<amplify-authenticator>
元素,并且AmplifyUIAngularModule
已从@aws-amplify/ui-angular
项目的单个模块中导入。它在开发版本中运行良好,但是当我尝试进行生产版本时,它失败了:
ERROR in src/app/signin/signin.page.html:13:5 - error NG8001: 'amplify-authenticator' is not a known element:
1. If 'amplify-authenticator' is an Angular component, then verify that it is part of this module.
2. If 'amplify-authenticator' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
13 <amplify-authenticator [handleAuthStateChange]="handleAuthStateChange">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/app/signin/signin.page.ts:7:18
7 templateUrl: 'signin.page.html',
~~~~~~~~~~~~~~~~~~
Error occurs in the template of component SigninPage.
我正在使用新的Amplify UI Components for Angular,据我所知,没有其他要导入的内容。任何想法可能出什么问题吗?
请导入AmplifyUIAngularModule
在同NgModule
是SignPageComponent
在声明。
AOT(提前)编译器按顺序解析NgModule。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句