I'm trying to create a forward component like in Ionic 4, push a component into the router-outlet without removing the old template and when I go back pop the pushed component template. here is Ionic like of what I'm trying to do https://ionicframework.com/docs/api/nav Now my question: Can I do that just with angular without Ionic, can please anyone explain how does this works?
here is my routes:
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [
{
path: 'home',
loadChildren: './home/home.module#HomePageModule'
},
{
path: 'sreach',
loadChildren: './sreach/sreach.module#SreachPageModule'
}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
I want to navigate from home to search like ionic forward without overriding the home, just hide it.