- Angular Router
- Victor Savkin
- 144字
- 2021-07-09 19:20:31
Applying redirects

The router gets a URL from the user, either when she clicks on a link or updates the location bar directly. The first thing that router does with this URL is it will apply any redirects.
What is a redirect?
Note
A redirect is a substitution of a URL segment. Redirects can either be local or absolute. Local redirects replace a single segment with a different one. Absolute redirects replace the whole URL. Redirects are local unless you prefix the url with a slash.
The provided configuration has only one redirect rule: { path: '', pathMatch: 'full', redirectTo: '/inbox' }
, i.e., replace /
with /inbox
. This redirect is absolute because the redirectTo
value starts with a slash.
Since we are navigating to /inbox/33/messages/44
and not /
, the router will not apply any redirects, and the URL will stay as is.
- Java應用開發與實踐
- Silverlight魔幻銀燈
- 手把手教你學C語言
- C#程序設計基礎:教程、實驗、習題
- Scala編程實戰(原書第2版)
- Learning Laravel's Eloquent
- Swift Playgrounds少兒趣編程
- Java程序設計與項目案例教程
- Lift Application Development Cookbook
- 自學Python:編程基礎、科學計算及數據分析(第2版)
- jQuery for Designers Beginner's Guide Second Edition
- DB2SQL性能調優秘笈
- UML基礎與Rose建模實用教程(第三版)
- Spark技術內幕:深入解析Spark內核架構設計與實現原理
- Learning Ionic(Second Edition)