Error compiling project in Angular

0

I'm using Angular (version 6) with TypeScript (version 1.6) and when I compile the code I get these errors:

Date: 2018-09-13T19:39:25.926Z
Hash: 0a25dba23a607e77d976
Time: 5711ms
chunk {main} main.js, main.js.map (main) 1.91 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 685 bytes [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.22 kB [entry] [rendered]
chunk {scripts} scripts.js, scripts.js.map (scripts) 142 kB  [rendered]
chunk {styles} styles.js, styles.js.map (styles) 148 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 326 kB [initial] [rendered]
i 「wdm」: Failed to compile.

ERROR in Cannot read property 'loadChildren' of undefined

This is the code of my appmodules.ts

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { HttpClientModule } from '@angular/common/http';
import { EmpleadoComponent } from './empleado/empleado.component';
import { appRouting } from './app.routing';
import { RouterModule,Routes } from '@angular/router';

const appRoutes: Routes = [
  { path: 'empleado', component: EmpleadoComponent }
];

@NgModule({
  declarations: [
    AppComponent,
    EmpleadoComponent
  ],
  imports: [
    appRouting,
    CommonModule,
    RouterModule.forRoot(routes),
    BrowserModule,
    FormsModule,
    HttpClientModule
  ],
  exports: [
  RouterModule
  ],

  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
    
asked by Sebastian Salazar 13.09.2018 в 22:00
source

0 answers