title: Catch youtube embed video events in ionic 3 app
body: <p>In my ionic app I have listed youtube embed videos as follows : </p>
  
  <pre><code>&lt;iframe allowfullscreen frameborder="0" height="200" width="100%" [src]="video.url"&gt;
        &lt;/iframe&gt;
  </code></pre>
  
  <p>the video.url is generated from the below function </p>
  
  <pre><code>generateVideoUrl(videoId) {
      return this.sanitizer.bypassSecurityTrustResourceUrl("https://www.youtube.com/embed/" + videoId + "?rel=0&amp;amp;showinfo=0");
    }
  </code></pre>
  
  <p>It works fine, but I also want to capture events like youtube video is paused, or ended, or started playing etc.
  I tried to import this <a href="http://brandly.github.io/angular-youtube-embed/#/" rel="nofollow noreferrer">http://brandly.github.io/angular-youtube-embed/#/</a> and use it with my ionic3 app, but that gives error 'angular is not defined'. Ionic does use angular but may be it use it differently that angular not defined error is generated. </p>
  
  <p>Thanks for you help.</p>