Make play button work on feed page
This commit is contained in:
parent
dacca59237
commit
d223dfd662
1 changed files with 7 additions and 1 deletions
|
@ -28,7 +28,7 @@ function FeedListCtrl($scope, feeds, pageSwitcher, $location) {
|
|||
pageSwitcher.change('feeds');
|
||||
}
|
||||
|
||||
function FeedCtrl($scope, $routeParams, $location, feeds, pageSwitcher, feedItems) {
|
||||
function FeedCtrl($scope, $routeParams, $location, feeds, pageSwitcher, feedItems, $rootScope) {
|
||||
$scope.nrQueueItemsOptions = [1, 2, 3, 4, 5];
|
||||
$scope.feed = {};
|
||||
// show info at top and items underneath
|
||||
|
@ -63,6 +63,12 @@ function FeedCtrl($scope, $routeParams, $location, feeds, pageSwitcher, feedItem
|
|||
feedItems.addToQueue(id);
|
||||
};
|
||||
|
||||
$scope.playItem = function(id) {
|
||||
feedItems.get(id, function(feedItem) {
|
||||
$rootScope.$broadcast('playItem', feedItem);
|
||||
});
|
||||
};
|
||||
|
||||
pageSwitcher.setBack('feeds');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue