March 2017
Intermediate to advanced
118 pages
2h 1m
English

Using redirects we can transform the URL before the router creates a router state out of it. This is useful for normalizing URLs and large scale refactorings.
Redirects can be local and absolute. Local redirects replace a single URL segment with a different one. Absolute redirects replace the whole URL.
If the redirectTo value starts with a /, then it is an absolute redirect. The next example shows the difference between relative and absolute redirects.
[ { path: ':folder/:id', component: ConversationCmp, children: [ { path: 'contacts/:name', redirectTo: '/contacts/:name' }, { path: 'legacy/messages/:id', ...Read now
Unlock full access