1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Twitter embedded for Angular 2

Discussão em 'Angular' iniciado por Huy Ham Hố, Julho 19, 2025.

  1. Huy Ham Hố

    Huy Ham Hố Guest

    I tried to embed Twitter timeline to my Angular 2 app. I followed this tutorial https://publish.twitter.com then I had this

    <a class="twitter-timeline" href="https://twitter.com/TwitterDev">Tweets by TwitterDev</a> <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>


    I put a tag into template and put script tag into index.html. This is an example.


    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Angular 2 App | ng2-webpack</title>
    <link rel="icon" type="image/x-icon" href="/img/favicon.ico">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
    <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
    <base href="/">
    </head>
    <body>
    <my-app>
    <div class="loading-container">
    <div class="loading"></div>
    <div id="loading-text">loading</div>
    <a class="twitter-timeline" href="https://twitter.com/TwitterDev">Tweets by TwitterDev</a>
    </div>
    </my-app>
    </body>
    </html>

    But it only showed the a tag, no timeline.

    Continue reading...

Compartilhe esta Página