title: External js library not work when route changes in angular
body: <p>I am using an external library on my app, I noticed that when I change the route  then return back the library stop working.
  The libraries are imported like this:</p>
  
  <pre><code>   import videojs from "video.js"
     import  "videojs-markers"
      ....
     ngOnInit() {
        this.video = videojs('demo');
        this.video.on('pause', function () {
          this.onPauseVideo(this.video.currentTime())
        }.bind(this));
        this.video.on('play', function () {
          this.onPlayVideo(this.video.currentTime())
        }.bind(this));
  
        this.setUpMarkers(this.video);
          this.subscription = this.commentService.commentsChange.subscribe((newComments:VideoComment[])=&gt;{
            this.video.markers.add(newComments.map(el=&gt;{
              return {time:el.time,text:el.text,overlayText:el.overlayText}})
            );
  
          })
        }
  
  
       ....
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/UkiW2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UkiW2.png" alt="enter image description here"></a></p>
  
  <p>any suggestions.</p>