Hello I am having very small angular 6 application, I am using angulalr route to route to next page, say thank you page but when I click on next button on my home page it is not showing next page at bottom of current page, however it appends /thankyou at URL.
app.routing.module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ThankYou } from './thank-you-page/thankyou';
export const routes: Routes = [
{ path: 'RediretingPage', component: RediretingPage}
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule]
})
export class AppRoutingModule { }
on HomeComponent.ts file on button click I have below code.
modal.componentInstance.option1
.pipe(takeUntil(this.destroy$))
.subscribe((modalInstance: NgbActiveModal) => {
console.log("insided routing thank you page")
modalInstance.dismiss();
this.router.navigate(['../RediretingPage']);
});
Please help