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