Currently, when I refresh a page from a route like
it stays on the same route. But I want the route to redirect to
I saw people have asked how to implement the refresh to stay on the same route. So I guess, the default angular should redirect to homepage on browser refresh. Any idea why my angular default project does this otherwise?
Below is my AppRoutingModule
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { SmileyFeedbackComponent } from '../smiley-feedback/smiley-feedback.component';
import { FeedbackFormComponent } from '../feedback-form/feedback-form.component';
import { ThankYouComponent } from '../thank-you/thank-you.component';
const routes: Routes = [
{ path: '', redirectTo: '/smiley', pathMatch: 'full' },
{ path: 'smiley', component: SmileyFeedbackComponent },
{ path: 'feedback', component: FeedbackFormComponent },
{ path: 'thank-you', component: ThankYouComponent }
];
@NgModule({
imports: [
RouterModule.forRoot(routes)
],
exports: [ RouterModule ],
declarations: []
})
export class AppRoutingModule { }
feedback
? – Misspeak