You must run the twitter widget script after your template has been uploaded.
I have done this:
export class SectionSocialComponent implements AfterViewInit { constructor() {} 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); } } (document,"script","twitter-wjs"); } }
And my .html file contains only this:
<a class="twitter-timeline" href="https://twitter.com/TwitterDev">Tweets by TwitterDev</a>
This may not be the most elegant solution, but it worked for me.
Ábó Szilágyi
source share