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

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.

主站蜘蛛池模板: 江源县| 芷江| 类乌齐县| 许昌市| 贵溪市| 衡南县| 莆田市| 靖安县| 卓资县| 馆陶县| 保定市| 沁源县| 富蕴县| 辉县市| 新宾| 黄冈市| 金溪县| 贡嘎县| 南昌市| 定陶县| 彰化市| 宝清县| 阳东县| 大关县| 宜川县| 平阳县| 仙桃市| 罗田县| 桃源县| 陕西省| 阳城县| 壶关县| 平顺县| 元朗区| 松桃| 岳普湖县| 洱源县| 香港| 怀宁县| 曲阳县| 天峻县|