Template parse errors: 'ion-text-avatar' is not a known element: 1

0

After putting lazy loading into the IONIC 3 project, following this tutorial, I came across an error in the directivs. What happens, I have the TextAvatarDirective directive that is imported into two pages, its modules:

import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { VendorqueuePage } from './vendorqueue';
import { IonTextAvatar } from 'ionic-text-avatar';

@NgModule({
  declarations: [
    VendorqueuePage,
    IonTextAvatar
  ],
  imports: [
    IonicPageModule.forChild(VendorqueuePage),
  ],
  exports: [
    VendorqueuePage
  ]
})
export class VendorqueuePageModule {}


import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { ListarTarefasPage } from './listar-tarefas';
import { IonTextAvatar } from 'ionic-text-avatar';

@NgModule({
  declarations: [
    ListarTarefasPage
  ],
  imports: [
    IonicPageModule.forChild(ListarTarefasPage),
    IonTextAvatar,
  ],
  exports: [
    ListarTarefasPage
  ]
})
export class ListarTarefasPageModule {}


When entering the Vendor module, it performs normal, the problem occurs when I try to get into the Task ListPage that the following error appears:

core.js:1350 ERROR Error: Uncaught (in promise): Error: Type IonTextAvatar is part of the declarations of 2 modules: VendorqueuePageModule and ListarVendedoresTarefasPageModule! Please consider moving IonTextAvatar to a higher module that imports VendorqueuePageModule and ListarVendedoresTarefasPageModule. You can also create a new NgModule that exports and includes IonTextAvatar then import that NgModule in VendorqueuePageModule and ListarVendedoresTarefasPageModule.
Error: Type IonTextAvatar is part of the declarations of 2 modules: VendorqueuePageModule and ListarVendedoresTarefasPageModule! Please consider moving IonTextAvatar to a higher module that imports VendorqueuePageModule and ListarVendedoresTarefasPageModule. You can also create a new NgModule that exports and includes IonTextAvatar then import that NgModule in VendorqueuePageModule and ListarVendedoresTarefasPageModule.


So I did what counseled to be done in error, and this error appears:


I already tried this in app.module: Home 1:

 @NgModule({
      declarations: [
        MyApp,
        TextAvatarDirective
      ],
      imports: [
        // DirectivesModule,
        BrowserModule,
        OrderModule,
    ...

2:

@NgModule({
  declarations: [
    MyApp,
    // TextAvatarDirective
  ],
  imports: [
    DirectivesModule,

But it continues with the same error as in the image.

    
asked by anonymous 10.12.2018 / 14:37

0 answers