Skip to content

adrael/ngx-tweet

 
 

Repository files navigation

ngx-tweet

npm version npm downloads GitHub issues Dependencies Dev Dependencies Peer Dependencies Known Vulnerabilities GitHub license

NPM

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)

About

Angular component for displaying a Twitter tweet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 83.7%
  • JavaScript 13.7%
  • HTML 2.6%