-
Install the library
npm install ngx-sharebuttons --save
-
Install font-awesome icons
npm install font-awesome --save
or use a FontAwesome CDN -
Choose the module:
- ShareButtonsModule for
<share-buttons></share-buttons>
- ShareButtonModule for
<share-button [button]="buttonName"></share-button>
- ShareDirectiveModule for
<button [shareButton]="buttonName"></button>
- ShareButtonsModule for
import { ShareButtonsModule } from 'ngx-sharebuttons';
@NgModule({
imports: [
HttpClientModule, // (Required) for share counts
HttpClientJsonpModule, // (Optional) For linkedIn & Tumblr counts
ShareButtonsModule.forRoot()
]
})
See usage documentation here
- Import the core styles and the theme from the global style
src/styles.scss
/** Import core style */
@import "~ngx-sharebuttons/styles/share-buttons";
/** Import a theme */
@import "~ngx-sharebuttons/styles/themes/circles/circles-theme";
Check all themes here
If you identify any errors in this component, or have an idea for an improvement, please open an issue. I am excited to see what the community thinks of this project, and I would love your input!
- Fork and clone the repo
- Install npm dependencies
npm install
- Make your changes
- Build the package
gulp build
- Submit your PR
This library was generated with generator-ngx-library by @tinesoft You may want to check it out for development info
Murhaf Sousli