[英]@ngx-share share button does not work in angular 6
I am using a Facebook share button in my angular 6 project, found here . 我在我的角度6项目中使用Facebook共享按钮,在这里找到。 This should supposed to "Convert any element to a share button using [shareButton] directive.". 这应该是“使用[shareButton]指令将任何元素转换为共享按钮。”
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';
在我的app.module.ts
我import { ShareModule } from '@ngx-share/core';
and then I put HttpClientModule
and ShareModule
in my Imports. 然后我将HttpClientModule
和ShareModule
放入我的Imports中。
Then I put this button in my template <button shareButton="facebook">Share</button>
. 然后我把这个按钮放在我的模板中<button shareButton="facebook">Share</button>
。 No errors here. 这里没有错误。
But if I do ng serve
again, I get 但如果我再次ng serve
,我会得到
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 ? 我怎样才能为角6做这个工作? The instructions for angular 6 look the same. 角度6的说明看起来相同。 What am I missing here? 我在这里错过了什么? Thanks 谢谢
npm install --save @angular/cdk@6
npm install --save @ngx-share/core@6
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.