4

I am using a Facebook share button in my angular 6 project, found here . This should supposed to "Convert any element to a share button using [shareButton] directive.".

According to the instructions, I do

npm i -S @ngx-share/core @angular/cdk

with no errors

In my app.module.ts I do import { ShareModule } from '@ngx-share/core'; and then I put HttpClientModule and ShareModule in my Imports.

Then I put this button in my template <button shareButton="facebook">Share</button>. No errors here.

But if I do ng serve again, I get

ERROR in node_modules/@ngx-share/core/lib/share.service.d.ts(12,26): error TS1005: ';' expected.
node_modules/@ngx-share/core/lib/share.service.d.ts(13,5): error TS1128: Declaration or statement expected.
node_modules/@ngx-share/core/lib/share.service.d.ts(14,21): error TS1005: ',' expected.
node_modules/@ngx-share/core/lib/share.service.d.ts(14,42): error TS1005: ';' expected.
node_modules/@ngx-share/core/lib/share.service.d.ts(14,48): error TS1109: Expression expected.
node_modules/@ngx-share/core/lib/share.service.d.ts(15,1): error TS1128: Declaration or statement expected.

What am I missing here? How can I make this work for angular 6 ? The instructions for angular 6 look the same. What am I missing here? Thanks

codebot
  • 517
  • 8
  • 29
  • 55

1 Answers1

3
npm install --save @angular/cdk@6
npm install --save @ngx-share/core@6