Skip to content

Commit bc45b6d

Browse files
committed
Explain how route nesting works with an example
Not being familiar with Ember, I wasn't clear on how nested routes work. This example would definitely have helped me understand (assuming it's correct).
1 parent 6b2a1b2 commit bc45b6d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ way down the view hierarchy. This allows you to create nested layouts
6565
without having to wire it all up yourself. `Link` components create
6666
accessible anchor tags to route you around the application.
6767

68+
As an example, if the current path is `/user/17`, the following
69+
component will be rendered:
70+
71+
```js
72+
<App activeRoute={
73+
<Users activeRoute={<User params={{userId: 17}} />} />
74+
} />
75+
```
76+
77+
Each component will also receive a `query` prop equal to a dictionary
78+
of the current query params.
79+
6880
Here's the rest of the application:
6981

7082
```js

0 commit comments

Comments
 (0)