- 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.
- LabVIEW 2018 虛擬儀器程序設計
- JavaScript+DHTML語法與范例詳解詞典
- Python深度學習
- C#程序設計(慕課版)
- 程序員考試案例梳理、真題透解與強化訓練
- NumPy Essentials
- Hadoop+Spark大數(shù)據(jù)分析實戰(zhàn)
- Mastering Python High Performance
- Lua程序設計(第4版)
- Elasticsearch for Hadoop
- Building RESTful Python Web Services
- Express Web Application Development
- 零基礎學C語言(第4版)
- 30天學通C#項目案例開發(fā)
- Access數(shù)據(jù)庫應用教程(2010版)