- Angular Router
- Victor Savkin
- 142字
- 2021-07-09 19:20:30
Router configuration
The router configuration defines all the potential router states of the application. Let's look at an example:
[ { 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' } ]
Don't worry about understanding all the details. I will cover them in later chapters. For now, let's depict the configuration as follows:

As you can see the router configuration is a tree, with every node representing a route. Some nodes have components associated with them, some do not. We also use color to designate different outlets, where an outlet is a location in the component tree where a component is placed.
推薦閱讀
- 黑客攻防從入門到精通(實(shí)戰(zhàn)秘笈版)
- C++案例趣學(xué)
- ExtGWT Rich Internet Application Cookbook
- 小程序?qū)崙?zhàn)視頻課:微信小程序開發(fā)全案精講
- BeagleBone Media Center
- 軟件工程
- 好好學(xué)Java:從零基礎(chǔ)到項(xiàng)目實(shí)戰(zhàn)
- Python語言實(shí)用教程
- 用戶體驗(yàn)可視化指南
- QGIS 2 Cookbook
- WebStorm Essentials
- Maven for Eclipse
- SQL Server實(shí)例教程(2008版)
- 例說FPGA:可直接用于工程項(xiàng)目的第一手經(jīng)驗(yàn)
- WCF全面解析