diff --git a/.gitignore b/.gitignore index f428af5..72fe71e 100644 --- a/.gitignore +++ b/.gitignore @@ -16,10 +16,8 @@ node_modules *.launch .settings/ *.sublime-workspace - # IDE - VSCode .vscode/* -!.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 748a9e8..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,25 +0,0 @@ -// Place your settings in this file to overwrite default and user settings. -{ - "files.exclude": { - "**/.git": true, - "**/.svn": true, - "**/.DS_Store": true, - "**/*.js": { - "when": "$(basename).ts" - }, - "**/*.js.map": false - }, - "search.exclude": { - "**/node_modules": true, - "**/bower_components": true, - "/dist": true - }, - "files.watcherExclude": { - "**/.git/objects/**": true, - "**/.git/subtree-cache/**": true, - "**/node_modules/*/**": true, - "/dist": true - }, - "typescript.tsdk": "./node_modules/typescript/lib", - "git.ignoreLimitWarning": true -} diff --git a/projects/ngx-clipboard/src/lib/ngx-clipboard.service.ts b/projects/ngx-clipboard/src/lib/ngx-clipboard.service.ts index df84f13..705e699 100644 --- a/projects/ngx-clipboard/src/lib/ngx-clipboard.service.ts +++ b/projects/ngx-clipboard/src/lib/ngx-clipboard.service.ts @@ -1,4 +1,4 @@ -import { Inject, Injectable } from '@angular/core'; +import { Inject, Injectable, Optional } from '@angular/core'; import { DOCUMENT } from '@angular/platform-browser'; import { WINDOW } from 'ngx-window-token'; @@ -7,7 +7,7 @@ import { WINDOW } from 'ngx-window-token'; @Injectable({ providedIn: 'root' }) export class ClipboardService { private tempTextArea: HTMLTextAreaElement | undefined; - constructor(@Inject(DOCUMENT) public document: any, @Inject(WINDOW) private window: any) {} + constructor(@Inject(DOCUMENT) public document: any, @Optional() @Inject(WINDOW) private window: any) {} public get isSupported(): boolean { return !!this.document.queryCommandSupported && !!this.document.queryCommandSupported('copy') && !!this.window; }