我目前正在通过我的JSON API检索数据来创建体育新闻应用程序,在我的文章中有推文的时候,我得到推文的HTML部分。
<blockquote> ... </ blockquote>
在互联网上做了一些研究后,我在Twitter.html中集成了Twitter脚本,但我的推文没有完全显示,我认为Javascript部分没有被调用..
index.html:
<link rel="icon" type="image/x-icon" href="assets/icon/favicon.png">
<link rel="manifest" href="manifest.json">
<meta name="theme-color" content="#4e8ef7">
<!-- add to homescreen for ios -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- cordova.js required for cordova apps (remove if not needed) -->
<script src="cordova.js"></script>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
contenu-article.html:
<div [innerHTML]="tweet | keepHtml" *ngIf="tweet">{{tweet}}</div>