I am using Angular 9 and trying to use the Clipboard Module programmatically.
constructor(
private clipboard: Clipboard
) {}
It just wouldn't compile
it gives in the console the following.
NullInjectorError: No provider for Clipboard!
I added 'Clipboard' in the app.module.ts providers array. It is also not working
It is giving
zone-evergreen.js:659 Unhandled Promise rejection: Illegal constructor ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Illegal constructor
at Object.factory (core.js:17177)
at R3Injector.hydrate (core.js:17053)
at R3Injector.get (core.js:16803)
at NgModuleRef$1.get (core.js:36454)
at Object.get (core.js:34091)
at getOrCreateInjectable (core.js:5830)
What am I missing?