ngClipboard: suddenly chrome issues "Illegal constructor" using ngClipboard
3ric6 opened this issue · 2 comments
code that was working for years stopped working today, issuing:
TypeError: Illegal constructor
at link (file:///C:/TEMP/EnvironmentStatus/scripts/ngclipboard.min.js:4:338)
at https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:80:293
at ja (https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:80:350)
at n (https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:66:28)
at g (https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:58:305)
at n (https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:65:473)
at g (https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:58:305)
at https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:57:455
at n (https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.js:16:19548)
at https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js:80:293
i have the same issue, and find out a way to fix it while waiting for the answer:
reason:
ngclipboard.js uses clipboard.js so maybe new commit from clipboard.js cause the issue
solution:
use the old version of clipboard.js
how to do it:
replace this:
https://cdn.rawgit.com/zenorocha/clipboard.js/master/dist/clipboard.min.js
to this:
https://cdn.rawgit.com/zenorocha/clipboard.js/2.0/dist/clipboard.min.js
hope it help.
This error is occurring due to the latest version release of ClipboardJs(2.0). I have fixed this issue in PR #45 .