Meu código parou de funcionar após fazer a criação dos submódulos. Já refiz a criação 3 vezes e o problema permance. Estava rodando corretamente antes dessa etapa. erro:
Failed to compile.
./src/main.ts
Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
RangeError: Maximum call stack size exceeded
at Set.add (<anonymous>)
at new Set (<anonymous>)
at LocalModuleScopeRegistry.getScopeOfModuleReference (/home/cponciano/Documents/Git/alurapic/node_modules/@angular/compiler-cli/src/ngtsc/scope/src/local.js:233:38)
at LocalModuleScopeRegistry.getExportedScope (/home/cponciano/Documents/Git/alurapic/node_modules/@angular/compiler-cli/src/ngtsc/scope/src/local.js:533:29)
at LocalModuleScopeRegistry.getScopeOfModuleReference (/home/cponciano/Documents/Git/alurapic/node_modules/@angular/compiler-cli/src/ngtsc/scope/src/local.js:271:44)
at LocalModuleScopeRegistry.getExportedScope (/home/cponciano/Documents/Git/alurapic/node_modules/@angular/compiler-cli/src/ngtsc/scope/src/local.js:533:29)
at LocalModuleScopeRegistry.getScopeOfModuleReference (/home/cponciano/Documents/Git/alurapic/node_modules/@angular/compiler-cli/src/ngtsc/scope/src/local.js:271:44)
at LocalModuleScopeRegistry.getExportedScope (/home/cponciano/Documents/Git/alurapic/node_modules/@angular/compiler-cli/src/ngtsc/scope/src/local.js:533:29)
at LocalModuleScopeRegistry.getScopeOfModuleReference (/home/cponciano/Documents/Git/alurapic/node_modules/@angular/compiler-cli/src/ngtsc/scope/src/local.js:271:44)
at LocalModuleScopeRegistry.getExportedScope (/home/cponciano/Documents/Git/alurapic/node_modules/@angular/compiler-cli/src/ngtsc/scope/src/local.js:533:29)
at LocalModuleScopeRegistry.getScopeOfModuleReference (/home/cponciano/Documents/Git/alurapic/node_modules/@angular/compiler-cli/src/ngtsc/scope/src/local.js:271:44)
at LocalModuleScopeRegistry.getExportedScope (/home/cponciano/Documents/Git/alurapic/node_modules/@angular/compiler-cli/src/ngtsc/scope/src/local.js:533:29)
at LocalModuleScopeRegistry.getScopeOfModuleReference (/home/cponciano/Documents/Git/alurapic/node_modules/@angular/compiler-cli/src/ngtsc/scope/src/local.js:271:44)
at LocalModuleScopeRegistry.getExportedScope (/home/cponciano/Documents/Git/alurapic/node_modules/@angular/compiler-cli/src/ngtsc/scope/src/local.js:533:29)
at LocalModuleScopeRegistry.getScopeOfModuleReference (/home/cponciano/Documents/Git/alurapic/node_modules/@angular/compiler-cli/src/ngtsc/scope/src/local.js:271:44)
at LocalModuleScopeRegistry.getExportedScope (/home/cponciano/Documents/Git/alurapic/node_modules/@angular/compiler-cli/src/ngtsc/scope/src/local.js:533:29)
photo.module.ts
import { CommonModule } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { PhotoComponent } from './photo.component';
@NgModule({
declarations: [
PhotoComponent
],
imports: [
CommonModule,
HttpClientModule
],
exports: [
PhotoComponent
]
})
export class PhotoModule {
}
photo-form.module.ts
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { PhotoFormComponent } from './photo-form.component';
@NgModule({
declarations: [
PhotoFormComponent
],
imports: [
CommonModule
]
})
export class PhotoFormModule {
}
photo-list.module.ts
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { PhotoModule } from '../photos.module';
import { FilterByDescription } from './filter-by-description.pipe';
import { LoadButtonComponent } from './load-button/load-button.component';
import { PhotoListComponent } from './photo-list.component';
import { PhotosComponent } from './photos/photos.component';
@NgModule({
declarations: [
PhotoListComponent,
PhotosComponent,
LoadButtonComponent,
FilterByDescription
],
imports: [
CommonModule,
PhotoModule
]
})
export class PhotoListModule {
}
photos.module.ts
import { NgModule } from '@angular/core';
import { PhotoFormModule } from './photo-form/photo-form.module';
import { PhotoListModule } from './photo-list/photo-list.module';
@NgModule({
imports: [
PhotoModule,
PhotoFormModule,
PhotoListModule
]
})
export class PhotoModule {}