npm i ngx-sharebuttons
app.module.ts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { ShareButtonsModule } from 'ngx-sharebuttons/buttons'; import { ShareIconsModule } from 'ngx-sharebuttons/icons'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; @NgModule({ imports: [ BrowserModule, FormsModule, ShareButtonsModule, ShareIconsModule, AppRoutingModule, ], declarations: [ AppComponent, ], bootstrap: [ AppComponent, ] }) export class AppModule { } |
app.component.ts
1 2 3 4 5 6 7 8 9 |
import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'], }) export class AppComponent { } |
app.component.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
<div class="container-fluid py-3"> <h1>Angular Share Buttons</h1> <share-buttons theme="circles-dark" [include]="['copy', 'facebook', 'email', 'messenger', 'mix', 'line', 'linkedin', 'pinterest', 'print', 'reddit', 'sms', 'telegram', 'tumblr', 'twitter', 'viber', 'vk', 'xing', 'whatsapp']" [showIcon]="true" [showText]="false" url="https://rodrigo.kamada.com.br/" description="Angular Share Buttons" twitterAccount="rodrigokamada" class="pt-5"> </share-buttons> <share-buttons theme="modern-dark" [include]="['copy', 'facebook', 'email', 'messenger', 'mix', 'line', 'linkedin', 'pinterest', 'print', 'reddit', 'sms', 'telegram', 'tumblr', 'twitter', 'viber', 'vk', 'xing', 'whatsapp']" [showIcon]="true" [showText]="true" url="https://rodrigo.kamada.com.br/" description="Angular Share Buttons" twitterAccount="rodrigokamada" class="pt-5"> </share-buttons> <share-buttons theme="modern-dark" [include]="['copy', 'facebook', 'email', 'messenger', 'mix', 'line', 'linkedin', 'pinterest', 'print', 'reddit', 'sms', 'telegram', 'tumblr', 'twitter', 'viber', 'vk', 'xing', 'whatsapp']" [showIcon]="false" [showText]="true" url="https://rodrigo.kamada.com.br/" description="Angular Share Buttons" twitterAccount="rodrigokamada" class="pt-5"> </share-buttons> </div> |
FULL SOURCE CODE