官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 普兰店市| 陇西县| 荔浦县| 旌德县| 屏南县| 深水埗区| 临沂市| 乐业县| 哈尔滨市| 当涂县| 葫芦岛市| 格尔木市| 曲松县| 吉木乃县| 喜德县| 承德市| 德安县| 大连市| 金山区| 尖扎县| 沙雅县| 娱乐| 望都县| 井陉县| 昌吉市| 云霄县| 汉中市| 正宁县| 綦江县| 普陀区| 得荣县| 翁源县| 商都县| 拉萨市| 龙游县| 达州市| 扎囊县| 黎城县| 古交市| 霍邱县| 云浮市|