title: AngularJS HTML audio player
body: <p>I'm creating a webpage using AngularJS. I am trying to play an audio file that is loaded when the page has finished loading. 
  This is the html code I'm using:</p>
  
  <pre><code>&lt;audio controls="controls"&gt;
       &lt;source ng-src="{{audioFile}}" type="audio/mp3"&gt;
  &lt;/audio&gt;
  </code></pre>
  
  <p>And this is my AngularJS file where the audio player doesn't play anything.</p>
  
  <pre><code>angular.module('MyApp')
      .controller('MyCtrl', ['$scope', '$routeParams', 'Quiz',
          function ($scope, $routeParams, Quiz) {            
              $scope.quiz = Quiz.get({quizId: $routeParams.quizId}, function() {
                  $scope.audioFile = "Link to some audioFile";
              });
          }
      ]);
  </code></pre>
  
  <p>But it works in the below code when I skip the service:</p>
  
  <pre><code>angular.module('MyApp')
      .controller('MyCtrl', ['$scope', '$routeParams', 'Quiz',
          function ($scope, $routeParams, Quiz) {            
               $scope.audioFile = "Link to some audioFile";
          }
      ]);
  </code></pre>
  
  <p>Is there any way to make this work when waiting for the response from the service?</p>