Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Started playlist editor
  • Loading branch information
sec11008 committed Dec 4, 2015
1 parent 1a8cd92 commit df8815e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
12 changes: 12 additions & 0 deletions TeamDBAwesome/TeamDBAwesome/js/adminController.js
Expand Up @@ -49,6 +49,18 @@ angular.module('routerApp').controller('adminController', function ($scope, $htt
$scope.showMediaOptions = false;
};



$scope.getPlaylists = function () {
console.log($scope.playlists);
$scope.playlists = [];
$http.get("http://localhost:50031/api/GetPlaylistList")
.success(function (response) {
$scope.playlists = angular.copy(response);
console.log(response);
})
}

$scope.playlists = [
{
"playlistId": "1",
Expand Down
14 changes: 11 additions & 3 deletions TeamDBAwesome/TeamDBAwesome/pages/playlist-editor.html
@@ -1,7 +1,15 @@
<head>
<title>Playlist Editor</title>
<meta charset="utf-8" />
<meta charset="utf-8" />
</head>
<div ng-controller="adminController" ng-init="getPlaylists()">

<div ng-controller="adminController" ng-init="getPlaylists();">
<a ng-click="getPlaylists()">Create New Playlist</a>
<table>
<tr ng-repeat="playlist in playlists">
<td>{{ playlist.PlaylistID }}</td>
<td>{{ playlist.Name }}</td>
<td><button>Edit</button></td>
<td><button>Delete</button></td>
</tr>
</table>
</div>

0 comments on commit df8815e

Please sign in to comment.