Answer the question
In order to leave comments, you need to log in
How to use old routing in angular6?
I am using angular6 and its routing. Thus, if I copy a link and open it, for example, in chrome's anonymous mode, I get a message that the page was not found. I would like to avoid this.
Is it possible to make the main address always start with a hash mark? For example like this:
http://localhost:4200/#/index1
http://localhost:4200/#/index2
http://localhost:4200/#/index3
http://localhost:4200/#/index1
Answer the question
In order to leave comments, you need to log in
1. Hash usage:
2. Redirect:
const appRoutes: Routes = [{
path: '',
redirectTo: '/index1',
pathMatch: 'full'
}
];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question