Skip to content

Commit 8a9a181

Browse files
authored
Updating the index demo page
Updating the index demo page to use ng-repeat, so the display becomes more data driven and less of a manual process to keep in sync
1 parent 6a937f6 commit 8a9a181

File tree

1 file changed

+5
-29
lines changed

1 file changed

+5
-29
lines changed

app/index.html

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,11 @@ <h1>Angular Url Parser</h1>
2525
<div class="col-lg-6">
2626
<h2>Url examples</h2>
2727

28-
<div class="row" style="margin-top: 20px">
29-
<div class="col-lg-1"><input type="radio" ng-model="Demo.selectedUrl" ng-value="Demo.example.current" ng-change="Demo.changeUrl(Demo.example.current)"></div>
30-
<div class="col-lg-11"><strong>Current url : </strong><code><small>{{ Demo.example.current }}</small></code></div>
31-
</div>
32-
33-
<div class="row" style="margin-top: 20px">
34-
<div class="col-lg-1"><input type="radio" ng-model="Demo.selectedUrl" ng-value="Demo.example.ex1" ng-change="Demo.changeUrl(Demo.example.ex1)"></div>
35-
<div class="col-lg-11"><code><small>{{ Demo.example.ex1 }}</small></code></div>
36-
</div>
37-
38-
<div class="row" style="margin-top: 20px">
39-
<div class="col-lg-1"><input type="radio" ng-model="Demo.selectedUrl" ng-value="Demo.example.ex2" ng-change="Demo.changeUrl(Demo.example.ex2)"></div>
40-
<div class="col-lg-11"><code><small>{{ Demo.example.ex2 }}</small></code></div>
41-
</div>
42-
43-
<div class="row" style="margin-top: 20px">
44-
<div class="col-lg-1"><input type="radio" ng-model="Demo.selectedUrl" ng-value="Demo.example.ex3" ng-change="Demo.changeUrl(Demo.example.ex3)"></div>
45-
<div class="col-lg-11"><code><small>{{ Demo.example.ex3 }}</small></code></div>
46-
</div>
47-
48-
<div class="row" style="margin-top: 20px">
49-
<div class="col-lg-1"><input type="radio" ng-model="Demo.selectedUrl" ng-value="Demo.example.ex4" ng-change="Demo.changeUrl(Demo.example.ex4)"></div>
50-
<div class="col-lg-11"><code><small>{{ Demo.example.ex4 }}</small></code></div>
51-
</div>
52-
53-
<div class="row" style="margin-top: 20px">
54-
<div class="col-lg-1"><input type="radio" ng-model="Demo.selectedUrl" ng-value="Demo.example.ex5" ng-change="Demo.changeUrl(Demo.example.ex5)"></div>
55-
<div class="col-lg-11"><code><small>{{ Demo.example.ex5 }}</small></code></div>
28+
<div class="row" style="margin-top: 20px" ng-repeat="(demoName, url) in Demo.example" >
29+
<div class="col-lg-1"><input type="radio" ng-model="Demo.selectedUrl" ng-value="url" ng-change="Demo.changeUrl(url)"></div>
30+
<div class="col-lg-11"><strong>{{demoName}} : </strong><code><small>{{ url }}</small></code></div>
5631
</div>
32+
5733
</div>
5834

5935
<div class="col-lg-6">
@@ -126,4 +102,4 @@ <h2>API</h2>
126102
<script type="application/javascript" src="../angular-url-parser.js"></script>
127103
<script type="application/javascript" src="app.js"></script>
128104
</body>
129-
</html>
105+
</html>

0 commit comments

Comments
 (0)