Skip to content

alexburykin/ngx-social-share

Repository files navigation

Description

Angular social sharing is easier that you think.

npm version License: MIT Open Source Love

ngx-socilal-share - simple directive for sharing your pages via facebook, linkedin and other

Usage

Install package

npm i ngx-social-share

Add import to your module

import { NgxSocialShareModule } from 'ngx-social-share';

@NgModule({
  imports: [
    ...
    NgxSocialShareModule,
    ],
  declarations: [],
  providers: []
})

Add [socialShare]="label_here" to any of your elements or components

<div>
  <div [socialShare]="'fb'">Facebook</div>
  <div [socialShare]="'tw'">Twitter</div>
  <div [socialShare]="'in'">Linkdedin</div>
  <div [socialShare]="'tr'">Tumblr</div>
  <div [socialShare]="'rd'">Reddit</div>
  <div [socialShare]="'pn'">Pinterest</div>
  <div [socialShare]="'dg'">Share via Digg</div>
</div>

On click this element will share current opened page to social

Current Labels

  • 'fb' - Facebook
  • 'tw' - Twitter
  • 'in' - LinkedIn
  • 'tr' - Tumblr
  • 'dg' - Digg
  • 'rd' - Reddit
  • 'pn' - Pinterest

About

Sharing directive for angular apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published