-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathindex.html
More file actions
44 lines (34 loc) · 1.31 KB
/
index.html
File metadata and controls
44 lines (34 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<html>
<head>
<script type="text/javascript" src="angular.js"></script>
<script type="text/javascript" src="app.js">
</script>
</head>
<body ng-app="tutorial">
<div ng-controller="PlaylistCtrl">
<input type="text" ng-model="currentSong"></input>
<button type="button" ng-click="addSong()">Add</button>
<br>
<input type="text" ng-model="playlistName"></input>
<button type="button" ng-click="savePlaylist()">Save</button>
<input type="text" ng-model="playlistSearch"></input>
<h2>New Playlist</h2>
<ul>
<li ng-repeat="song in playlist track by $index">
{{ song }} <button type="button" ng-click="removeSong($index)">Remove</button>
</li>
</ul>
<h2>Saved Playlists</h2>
<h3 ng-repeat="list in playlistSet track by $index"
ng-click="displaySelected(list)">
{{ list.name }}
</h3>
<h2>Current Playlist ({{ currentPlaylist.name }})</h2>
<ul>
<li ng-repeat="song in currentPlaylist.playlist | filter:playlistSearch">
{{ song }}
</li>
</ul>
</div>
</body>
</html>