mirror of https://github.com/abpframework/abp.git
8 changed files with 15 additions and 38 deletions
@ -1,17 +0,0 @@ |
|||
import { Inject, Injectable, PLATFORM_ID } from '@angular/core'; |
|||
import { isPlatformBrowser, isPlatformServer } from '@angular/common'; |
|||
|
|||
@Injectable({ |
|||
providedIn: 'root', |
|||
}) |
|||
export class SSRService { |
|||
private platformId = Inject(PLATFORM_ID); |
|||
|
|||
get isBrowser() { |
|||
return isPlatformBrowser(this.platformId); |
|||
} |
|||
|
|||
get isServer() { |
|||
return isPlatformServer(this.platformId); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue