mirror of https://github.com/abpframework/abp.git
2 changed files with 13 additions and 0 deletions
@ -0,0 +1,12 @@ |
|||||
|
import { Injectable, inject } from '@angular/core'; |
||||
|
import { DOCUMENT } from '@angular/common'; |
||||
|
|
||||
|
@Injectable({ providedIn: 'root' }) |
||||
|
export class AbpWindowService { |
||||
|
protected readonly window = inject(DOCUMENT).defaultView; |
||||
|
protected readonly navigator = this.window.navigator; |
||||
|
|
||||
|
copyToClipboard(text: string): Promise<void> { |
||||
|
return this.navigator.clipboard.writeText(text); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue