-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsongsDirective.html
More file actions
executable file
·33 lines (32 loc) · 1.16 KB
/
songsDirective.html
File metadata and controls
executable file
·33 lines (32 loc) · 1.16 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
<table>
<tr ng-repeat="track in songsList.songs">
<td>
<span ng-hide="track.editMode" ng-bind="track.title"></span>
<input ng-model="track.title" ng-show="track.editMode" />
</td>
<td>
<span ng-hide="track.editMode" ng-bind="track.composer"></span>
<input ng-model="track.composer" ng-show="track.editMode" />
</td>
<td>
<select ng-model="track.genreList" ng-options="genre for genre in songsList.genreList"></select>
</td>
<td>
<button ng-click="track.editMode = !track.editMode">Edit</button>
</td>
</tr>
<tr>
<td>
<button ng-click="songsList.startNewSong();">Add</button>
<form name='newSongForm' ng-if='songsList.newSong'>
<input required name="songTitle" ng-model="songsList.newSong.title" />
<button ng-click="songsList.finishNewSong();">
Finish Song
</button>
</form>
</td>
</tr>
</table>
<ul>
<li ng-repeat="eachGenre in songsList.genreList">{{eachGenre}}</li>
</ul>