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

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.

主站蜘蛛池模板: 苏尼特左旗| 双鸭山市| 罗平县| 资溪县| 武安市| 台东市| 镇原县| 墨竹工卡县| 岳普湖县| 荔浦县| 福州市| 积石山| 綦江县| 荥阳市| 曲周县| 手游| 新邵县| 大足县| 延庆县| 秭归县| 汪清县| 蕲春县| 云安县| 吉木萨尔县| 万载县| 龙门县| 龙口市| 广元市| 偃师市| 铁岭市| 新巴尔虎右旗| 岑溪市| 花垣县| 噶尔县| 炉霍县| 满城县| 灵台县| 曲周县| 蓝山县| 辽中县| 九寨沟县|