Like the title states, all docs for the amplify authenticator component have it wrapping app-component. I wish to have routes which are not authenticated, and I don't want to prompt users to login unless I direct them to my signing component. I understand I could do it all custom, create a service class and call signing myself, but I figured I would use the authenticator component since it's readily available. Is this possible? I tried add authenticatorp-component to a child component in an angular route and I get errors of missing form fields.
Blockquote ERROR TypeError: Cannot destructure property 'country_code' of '(0 , actor_mjs__WEBPACK_IMPORTED_MODULE_0_.getActorContext)(...)' as it is undefined.
By the way adding the child component directly to app.component works, the issue is if we access the child component via routes.
It was my mistake all along. The child component I had created for my signinpage happened to be named the same as a component in Amplify module. The wrong component was imported into routes.
You can add this code, into a child component
<amplify-authenticator>
<ng-template amplifySlot="authenticated" let-user="user" let-signOut="signOut">
<h2>Welcome, {{ user.username }}!</h2>
<button (click)="signOut()">Sign Out</button>
</ng-template>
</amplify-authenticator>