title: Why will my twitter widget not render if i change the view in angularjs?
body: <p>Hi and thanks for reading.</p>
  
  <p>I have a angular app im making and ive stumbled on a problem. set up as so </p>
  
  <p>index.html-</p>
  
  <pre><code>&lt;html ng-app="myApp"&gt;
  ...
  &lt;div ng-view&gt;&lt;/div&gt;
  &lt;div ng-include="'footer.html'"&gt;&lt;/div&gt;
  ...
  &lt;/html&gt;
  </code></pre>
  
  <p>I wont bother putting my routes its pretty simple /home is shows the /home/index.html and so on...</p>
  
  <p>/home/index.html (default view when you come to the site)</p>
  
  <pre><code>&lt;div class="responsive-block1"&gt;
  &lt;div class="tweet-me"&gt;
      &lt;h1&gt; tweet me &lt;/h1&gt;
  &lt;/div&gt;
  
  &lt;div class="twitter-box"&gt;
      &lt;twitter-timeline&gt;&lt;/twitter-timeline&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>twitter timeline directive</p>
  
  <pre><code>directives.directive("twitterTimeline", function() {
  return { 
       restrict: 'E',
       template: '&lt;a class="twitter-timeline" href="https://twitter.com/NAME" data-widget-id="XXXXXXXXXXXXXX"&gt;Tweets by @NAME&lt;/a&gt;',
       link: function(scope, element, attrs) {
  
      function run(){
          (!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"));
          console.log('run script');
      };
  
      run();
  
  
       }
     };
  });
  </code></pre>
  
  <p>So I have just created a basic twitter directive using the  tag from twitter. But when I change the view example to /blog then go back to /home the twitter widget no longer renders at all. </p>
  
  <p>Im also using an $anchorScroll and if i jump to anyway on the page with this the widget also disappears. Any info would be great thanks.</p>