2

i embed twitts on my angular app thanks to this thread:

however - i need to update dynamically the twitts, i know i need to use the twttr.widgets.load(), but i have no idea how. also tries ng2-twitt, but could not make it work , and with this article cant make twitts to work at all

basically i put the script tag

in the index html and did execly like the thread. need help to make it work dynamically

My ngAfterViewInit:

!function (d, s, id) {
    var js: any,
        fjs = d.getElementsByTagName(s)[0],
        p = '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);

    }

my html

<blockquote class="twitter-tweet"  >
              <a [attr.href]="feed.path"></a>
        </blockquote>

Tanks!!

BB_KING
  • 145
  • 2
  • 13

0 Answers0