AngularJS : service $broadcast and $watch not triggering on receiving controller

后端 未结 4 1981
感动是毒
感动是毒 2021-02-02 10:19

AngularJS noob here, on my path to the Angular Enlightenment :)

Here\'s the situation:

I have implemented a service \'AudioPlayer\' inside my module \'app\' and

4条回答
  •  隐瞒了意图╮
    2021-02-02 10:53

    // apply changes
    $scope.current = track;
    try {
     if (!$scope.$$phase) {
      $scope.$apply($scope.current);
     }
    } catch (err) {
     console.log(err);
    }
    

提交回复
热议问题