Sharing Top Content from the Angular-sphere.

After almost three years of (infrequent) development, ngTweet finally hit 1.0.0! #angularjs @TwitterDev

  • Your markup should look like this at the end: – – There are two ways to embed a Twitter widget – with the source from Twitter (embedded), or via Tweet ID (linked).
  • Then, simply wrap it in a tag: – – Load your app, and you get: – – Given a Tweet with ID ‘617749885933232128’, simply add a tag to your markup with an attribute named specifying the Tweet ID.
  • Then wrap it in a tag: – – Load your app, and you get: – – Given a timeline with ID ‘673710543212052480’, simply add a tag to your markup with an attribute named specifying the Timeline ID.
  • To get the food truck timeline from above… – – The first time the directive is encountered, ngTweet downloads Twitter’s Widget script.
  • Run to generate the debug and minified JavaScript files, and then to run the demo site to verify embeds work.

ngtweet – Easily embed Twitter widgets into your Angular application! No more having to kludge together a Twitter script loader, or manage embed state on route/visibility change.

Easily embed Twitter widgets into your Angular application! No more having to kludge together a Twitter script loader, or manage embed state on visibility change.

Then include or in your markup and add to your application’s dependencies. Your markup should look like this at the end:

There are two ways to embed a Twitter widget – with the source from Twitter (embedded), or via Tweet ID (linked).

Given the source for an embedded Tweet

First, remove the element from the markup. Then, simply wrap it in a tag:

Load your app, and you get:

Given a Tweet with ID ‘617749885933232128’, simply add a tag to your markup with an attribute named specifying the Tweet ID.

This, combined with , can display collections of individual Tweets:

Given the source for an embedded timeline.

Remove the element from the markup. Then wrap it in a tag:

Load your app, and you get:

Given a timeline with ID ‘673710543212052480’, simply add a tag to your markup with an attribute named specifying the Timeline ID.

Recently, Twitter updated how one goes about embedding a timeline – instead of generating an ID and linking to…

GitHub