Ion-text-avatar error is not resolving


#1

I have installed the ion-text-avatar as described and added it to the declarations array of app.module.ts.
It is working in one page.html but when I try to use in different pages then I get following error message:
Uncaught (in promise): Error: Template parse errors:
‘ion-text-avatar’ is not a known element:

If ‘ion-text-avatar’ is an Angular component, then verify that it is part of this module.
If ‘ion-text-avatar’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message. ("

[ERROR ->]M
Then I added CUSTOM_ELEMENTS_SCHEMA and NO_ERRORS_SCHEMA to @NgModule.schemas, but get still the same error message.

Could you please help with a hint, what I could do.


#2

Two options:

  1. Stop using lazy loading.
  2. Import the module for this ion-text-avatar thing into the module of every lazily loaded page that uses it.

One thing you should not do is what you did with CUSTOM_ELEMENTS_SCHEMA. That is telling Angular that you know exactly what you are doing, and you don’t.


#3

Ok I’ll try those options.Thank you