- Angular Router
- Victor Savkin
- 139字
- 2021-07-09 19:20:31
URL format
Since I will use a lot of URLs in the following examples, let's quickly look at the URL formats:
/inbox/33(popup:compose)
/inbox/33;open=true/messages/44
As you can see, the router uses parentheses to serialize secondary segments (for example, popup:compose
), the colon syntax to specify the outlet, and the ;parameter=value
syntax (for example, open=true
) to specify route specific parameters.
In the following examples we assume that we have given the following configuration to the router, and we are navigating to /inbox/33/messages/44
:
[ { path: '', pathMatch: 'full', redirectTo: '/inbox' }, { path: ':folder', children: [ { path: '', component: ConversationsCmp }, { path: ':id', component: ConversationCmp, children: [ { path: 'messages', component: MessagesCmp }, { path: 'messages/:id', component: MessageCmp } ] } ] }, { path: 'compose', component: ComposeCmp, outlet: 'popup' }, { path: 'message/:id', component: PopupMessageCmp, outlet: 'popup' } ]
推薦閱讀
- Java程序設(shè)計實戰(zhàn)教程
- LabVIEW Graphical Programming Cookbook
- PowerCLI Cookbook
- Git高手之路
- Learning Zurb Foundation
- TMS320LF240x芯片原理、設(shè)計及應(yīng)用
- Unity 3D/2D移動開發(fā)實戰(zhàn)教程
- Emotional Intelligence for IT Professionals
- Instant Automapper
- 現(xiàn)代C++語言核心特性解析
- Python高性能編程(第2版)
- Effective C++:改善程序與設(shè)計的55個具體做法(第三版)中文版(雙色)
- Mastering Clojure
- 歐姆龍PLC編程指令與梯形圖快速入門
- 軟件測試