Skip to content

Commit

Permalink
init music controller with boxId
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles committed Nov 12, 2016
1 parent b551e80 commit 8f77cc3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions assets/js/app/music/music.controller.js
Expand Up @@ -32,14 +32,18 @@
vm.getCurrentTrack = getCurrentTrack;
vm.getQueue = getQueue;

activate();
vm.init = init;

function activate(){
getRoomId();
if(vm.displayAskRoomForm) getRooms();
else refreshMusicData();
}


function init(boxId){
vm.boxId = boxId;
activate();
}

function getRoomId() {
vm.roomId = musicService.getSavedRoomBox(vm.boxId);
Expand Down

0 comments on commit 8f77cc3

Please sign in to comment.