-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsongsController.js
More file actions
executable file
·25 lines (22 loc) · 985 Bytes
/
songsController.js
File metadata and controls
executable file
·25 lines (22 loc) · 985 Bytes
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
songsApp.controller('songsController', ['genreProvider', function songCtrlInit (genreProvider) {
this.test = "flirzelkwerp";
this.genreList = genreProvider;
this.songs = [
{title: "Baba O'Riley", composer: "Pete Townshend"},
{title: "Bargain", composer: "Pete Townshend"},
{title: "Love Ain't For Keeping", composer: "Pete Townshend"},
{title: "My Wife", composer: "John Entwistle"},
{title: "The Song Is Over", composer: "Pete Townshend"},
{title: "Getting In Tune", composer: "Pete Townshend"},
{title: "Goin' Mobile", composer: "Pete Townshend"},
{title: "Behind Blue Eyes", composer: "Pete Townshend"},
{title: "Won't Get Fooled Again", composer: "Pete Townshend"}
];
this.startNewSong = function startNewSong() {
this.newSong = {};
};
this.finishNewSong = function finishNewSong() {
this.songs.push(this.newSong);
delete this.newSong;
};
}]);