Trying to incorporate a Twitter embedded timeline into my Ionic 2 app, but facing an issue where the timeline disappears once the user navigates away from the view. Any ideas on what might be causing this issue?
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>Social Media</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<a class="twitter-timeline" href="https://twitter.com/hashtag/amyawards2017" data-widget-id="837781109337436160">#amyawards2017 Tweets</a>
<!--<script>!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");</script>-->
</ion-content>
export class SocialMediaPage{
constructor(public navCtrl: NavController,
private loadingCtrl: LoadingController,private toastCtrl: ToastController,
private alertCtrl: AlertController,
public twitter: TwitterService) {
}
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");
}
}