friends I want to load a component that is in a routing module apart from the main routing module but calling the component from the main module by means of lazy load, loadchildren. the truth that does not show me anything. Here I leave the app-routing.module.ts the main module of routes.
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './views/home/home/home.component';
import { NotFoundComponent } from './views/not-found/not-found/not-
found.component';
const routes: Routes = [
{ path: '' , component: HomeComponent },
{ path: 'operations' , loadChildren: '../views/operations/operations-
routing.module#OperationsModule' } ,
{ path: '404' , component: NotFoundComponent },
{ path: '**', redirectTo : '/404' }
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
now here I leave you the module operations-routing.module.ts the module of operations routing
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { OperationsComponent } from './operations/operations.component';
const routes: Routes = [
{ path: '', component : OperationsComponent }
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class OperationsRoutingModule { }
the html file of operations.component.html
<div>
<h1>PAGINA DE OPERACIONES</h1>
</div>
supúestamente the code above should show me html.
Well, I do not care about the child routing module to the main and main module of routiong, because the idea esq does not load much no.
thank you very much:).