title: AngularJS Error: $interpolate:interr Interpolation Error
body: <p>I am trying to get a youtube video inserted into my website with AngularJS, but I keep getting the same error:</p>
  
  <pre><code>Error: $interpolate:interr Interpolation Error
  </code></pre>
  
  <p>Why do I get this error and how can I get rid of it? All I want is to insert the video...</p>
  
  <p><strong>App.js</strong></p>
  
  <pre><code>var myApp = angular.module('myApp', [
      'duScroll', 'duParallax', 'angularFileUpload', 'ngRoute', 'ngSanitize'
  ]);
  
  myApp.filter('youtube', ['$sce', function($sce) {
      return function(val) {
          var videoLink = val;
          var watch = val.indexOf("?v=") + 3;
          var playlist = val.indexOf('&amp;') + 1;
  
          if (playlist &gt; 0) {
              return $sce.getTrustedResourceUrl('//www.youtube.com/embed/' + val.substring(watch, playlist));
          } else {
              return $sce.getTrustedResourceUrl('//www.youtube.com/embed/' + val.substring(watch, videoLink.length));
          }
      };
  }]);
  </code></pre>
  
  <p><strong>index.jade</strong></p>
  
  <pre><code>iframe(ng-if="story.media.video" src="{{ story.media.video | youtube }}" frameborder="0" allowfullscreen)
  </code></pre>