mirror of https://github.com/abpframework/abp
parent
6b41386660
commit
8526aace20
@ -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