You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
3. Add some templates. These will plug into the `ui-view` within index.html. Notice that they have their own `ui-view` as well! That is the key to nesting states and views.
91
+
>
92
+
```html
93
+
<!-- route1.html -->
94
+
<h1>Route 1</h1>
95
+
<hr/>
96
+
<ahref="#/route1/list">Show List</a>
97
+
<divui-view></div>
98
+
```
99
+
```html
100
+
<!-- route2.html -->
101
+
<h1>Route 2</h1>
102
+
<hr/>
103
+
<ahref="#/route2/list">Show List</a>
104
+
<divui-view></div>
105
+
```
106
+
107
+
4. Add some child templates. *These* will get plugged into the `ui-view` of their parent state templates.
108
+
```html
109
+
<!-- route1.list.html -->
110
+
<h3>List of Route 1 Items</h3>
111
+
<ul>
112
+
<ling-repeat="item in items">{{item}}</li>
113
+
</ul>
114
+
```
115
+
```html
116
+
<!-- route2.list.html -->
117
+
<h3>List of Route 2 Things</h3>
118
+
<ul>
119
+
<ling-repeat="thing in things">{{thing}}</li>
120
+
</ul>
121
+
```
122
+
123
+
5. Now let's wire it all up. Set up your states in the module config:
Another handy feature is the ability to have more than one view per template. Please note: 95% of the time Nested States & Views is the pattern you'll be looking for, opposed to using multiple views per template.
>**[Go to Quick Start Plunker](http://plnkr.co/edit/vDURUN?p=preview)**
225
+
4. See this quick start example in action.
226
+
>**[Go to Quick Start Plunker for Multiple & Named Views](http://plnkr.co/edit/vDURUN?p=preview)**
123
227
124
-
6. This only scratches the surface! You've only seen Named Views and Parallel Views. Learn more about `state()` options, Nested Views, URL routing options, backwards compatibility, and more!
228
+
5. This only scratches the surface! You've only seen Named Views and Parallel Views.
0 commit comments