ngx-tweet
v2.0.3
Published
Angular component for displaying a Twitter Tweet
Downloads
799
Readme
ngx-tweet
Angular Tweet Component
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).
Installation
npm install ngx-tweet --save
or yarn add ngx-tweet
Usage
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!
Development server
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.
Build
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.
Running unit tests
Run ng test
to execute the unit tests via Karma.
License
The MIT License (see the LICENSE file for the full text)