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.
ngx-tweet is sourced from arusahni's ngTweet app (https://github.com/arusahni/ngtweet).
npm install ngx-tweet --save
or yarn add ngx-tweet
Import NgxTweetModule
in your module:
import { NgxTweetModule } from "ngx-tweet";
@NgModule({
[...]
imports: [
NgxTweetModule
]
[...]
})
Finally, use ngx-tweet
component in your template:
<ngx-tweet tweetId="921670221710032896"></ngx-tweet>
The tweetId
is the number at the end of the tweet url that you want to embed, for example,
https://twitter.com/nixcraft/status/921670221710032896
And voila! Happy Tweeting!
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
The MIT License (see the LICENSE file for the full text)