Tenho o seguinte erro, não consegui achar o que seria :(
Error: Error: Unexpected module 'FotoModule' declared by the module 'FotoModule'
at eval (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:14174:33)
at Array.forEach (<anonymous>)
at CompileMetadataResolver.getNgModuleMetadata (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:14161:51)
at eval (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:14124:52)
at Array.forEach (<anonymous>)
at CompileMetadataResolver.getNgModuleMetadata (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:14111:46)
at RuntimeCompiler._compileComponents (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:16803:49)
at RuntimeCompiler._compileModuleAndComponents (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:16741:39)
at RuntimeCompiler.compileModuleAsync (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:16732:23)
at PlatformRef_._bootstrapModuleWithZone (http://localhost:3000/node_modules/@angular/core/bundles/core.umd.js:6954:29)
Evaluating http://localhost:3000/app/main.js
Error loading http://localhost:3000/app/main.js
App.module.ts
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {AppComponent} from './app.component';
import {FotoModule} from './foto/foto.module';
@NgModule({
imports: [BrowserModule, FotoModule],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule{}
App.component.ts
import {Component} from '@angular/core';
@Component({
moduleId: module.id,
selector: 'app',
templateUrl: './app.component.html'
})
export class AppComponent{}
Foto.module.ts
import {NgModule} from '@angular/core';
import {FotoComponent} from './foto.component'
@NgModule({
declarations: [FotoModule],
exports: [FotoComponent]
})
export class FotoModule{}
Foto.component.ts
import {Component} from '@angular/core';
@Component({
moduleId: module.id,
selector: 'foto',
templateUrl: './foto.component.html'
})
export class FotoComponent{}