- 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' } ]
推薦閱讀
- Visual FoxPro程序設(shè)計(jì)教程(第3版)
- Android項(xiàng)目開發(fā)入門教程
- Photoshop智能手機(jī)APP UI設(shè)計(jì)之道
- Getting Started with CreateJS
- Neo4j Essentials
- Python數(shù)據(jù)分析(第2版)
- HTML5+CSS3網(wǎng)站設(shè)計(jì)基礎(chǔ)教程
- Learning FuelPHP for Effective PHP Development
- Visual FoxPro程序設(shè)計(jì)習(xí)題集及實(shí)驗(yàn)指導(dǎo)(第四版)
- Python機(jī)器學(xué)習(xí)算法: 原理、實(shí)現(xiàn)與案例
- Building Wireless Sensor Networks Using Arduino
- C# Multithreaded and Parallel Programming
- Arduino可穿戴設(shè)備開發(fā)
- 貫通Tomcat開發(fā)
- 從零開始構(gòu)建深度前饋神經(jīng)網(wǎng)絡(luò):Python+TensorFlow 2.x