Skip to main content

Command Palette

Search for a command to run...

Angular :4 : Error while using ngx-clipboard

Published
1 min read
S

I love learning about technology and sharing that with others

Error :

An accessor cannot be declared in an ambient context

In line :

import { ClipboardModule } from 'ngx-clipboard';

solution

we need to download the npm dependency version for the ngx-clipboard since we are using angular 4

If you need to use it on 2.x, please use version 7.x.x. If you need to use it on 4.x, please use version 8.x.x. If you need to use it on 5.x, please use version 10.x.x. If you need to use it on 8.x, please use version 12.x.x. If you need to use it on 9.x, please use version 13.x.x. If you need to use it on 10.x, please use version 14.x.x.

below mentioned is the version we will be using for the angular 4

8.0.3

npm install ngx-clipboard@8.0.3 --save
10 views

More from this blog

H

hashcodehub

271 posts

Consistent, Passionate and Organized :)