Permalink
Switch branches/tags
aot electron greenkeeper/angular-tslint-rules-1.4.0 greenkeeper/angular-tslint-rules-1.4.1 greenkeeper/angular-tslint-rules-1.5.0 greenkeeper/@angular/cdk-6.0.2 greenkeeper/@angular/cdk-6.1.0 greenkeeper/@angular/flex-layout-6.0.0-beta.16 greenkeeper/@angular/material-6.0.2 greenkeeper/@angular/material-6.1.0 greenkeeper/@angular/platform-server-6.0.2 greenkeeper/@angular/platform-server-6.0.3 greenkeeper/@angular/router-6.0.2 greenkeeper/@angular/router-6.0.3 greenkeeper/@angular/service-worker-6.0.2 greenkeeper/@angular/service-worker-6.0.3 greenkeeper/angularfire2-5.0.0-rc.8.0 greenkeeper/angularfire2-5.0.0-rc.9 greenkeeper/angularfire2-5.0.0-rc.10 greenkeeper/angularfire2-5.0.0-rc.11 greenkeeper/angulartics2-6.1.0 greenkeeper/angulartics2-6.1.1 greenkeeper/angulartics2-6.2.0 greenkeeper/body-parser-1.18.3 greenkeeper/browser-sync-2.24.4 greenkeeper/browser-sync-2.24.5 greenkeeper/browser-sync-2.24.6 greenkeeper/clean-css-4.2.0 greenkeeper/clean-css-4.2.1 greenkeeper/@compodoc/compodoc-1.1.3 greenkeeper/compressible-2.0.14 greenkeeper/compression-1.7.3 greenkeeper/concurrently-3.6.0 greenkeeper/concurrently-3.6.1 greenkeeper/conventional-changelog-2.0.0 greenkeeper/conventional-changelog-2.0.1 greenkeeper/core-js-2.5.7 greenkeeper/dotenv-6.0.0 greenkeeper/@expo/bunyan-3.0.0 greenkeeper/@expo/bunyan-3.0.1 greenkeeper/@expo/bunyan-3.0.2 greenkeeper/firebase-5.0.3 greenkeeper/firebase-5.0.4 greenkeeper/firebase-5.1.0 greenkeeper/firebase-5.2.0 greenkeeper/firebase-5.3.0 greenkeeper/firebase-5.3.1 greenkeeper/firebase-5.4.0 greenkeeper/firebase-admin-5.12.1 greenkeeper/firebase-admin-5.13.0 greenkeeper/firebase-admin-5.13.1 greenkeeper/firebase-admin-6.0.0 greenkeeper/firebase-tools-3.18.5 greenkeeper/firebase-tools-3.18.6 greenkeeper/firebase-tools-3.19.0 greenkeeper/firebase-tools-3.19.1 greenkeeper/firebase-tools-3.19.2 greenkeeper/firebase-tools-3.19.3 greenkeeper/firebase-tools-4.0.0 greenkeeper/firebase-tools-4.0.1 greenkeeper/firebase-tools-4.0.2 greenkeeper/firebase-tools-4.0.3 greenkeeper/firebase-tools-4.1.0 greenkeeper/firebase-tools-4.1.1 greenkeeper/firebase-tools-4.1.2 greenkeeper/fuse-box-3.3.0 greenkeeper/fuse-box-3.4.0 greenkeeper/fuse-box-typechecker-2.9.0 greenkeeper/fuse-box-typechecker-2.10.0 greenkeeper/greenkeeper-lockfile-1.15.1 greenkeeper/html-minifier-3.5.16 greenkeeper/html-minifier-3.5.17 greenkeeper/html-minifier-3.5.18 greenkeeper/html-minifier-3.5.19 greenkeeper/html-minifier-3.5.20 greenkeeper/jsdom-11.11.0 greenkeeper/jsdom-11.12.0 greenkeeper/jsdom-12.0.0 greenkeeper/monorepo.angular2-6.2.0 greenkeeper/monorepo.angular2-6.2.1 greenkeeper/monorepo.angular2-6.3.0 greenkeeper/monorepo.angular2-6.3.1 greenkeeper/monorepo.angular2-6.3.2 greenkeeper/monorepo.angular2-6.3.3 greenkeeper/monorepo.angular2-6.4.0 greenkeeper/monorepo.angular2-6.4.1 greenkeeper/monorepo.angular2-6.4.2 greenkeeper/monorepo.angular2-6.4.3 greenkeeper/monorepo.angular2-6.4.4 greenkeeper/monorepo.angular2-6.4.5 greenkeeper/monorepo.angular2-6.4.6 greenkeeper/@nguniversal/common-6.1.0 greenkeeper/@nguniversal/express-engine-6.1.0 greenkeeper/@ngx-meta/core-6.0.0 greenkeeper/node-sass-4.9.1 greenkeeper/node-sass-4.9.2 greenkeeper/node-sass-4.9.3 greenkeeper/request-2.86.0 greenkeeper/request-2.87.0 greenkeeper/request-2.88.0 greenkeeper/semantic-release-15.4.1 greenkeeper/semantic-release-15.4.2 greenkeeper/semantic-release-15.4.3 greenkeeper/semantic-release-15.4.4 greenkeeper/semantic-release-15.5.0 greenkeeper/semantic-release-15.5.1 greenkeeper/semantic-release-15.5.2 greenkeeper/semantic-release-15.5.3 greenkeeper/semantic-release-15.5.4 greenkeeper/semantic-release-15.5.5 greenkeeper/semantic-release-15.6.0 greenkeeper/semantic-release-15.6.1 greenkeeper/semantic-release-15.6.2 greenkeeper/semantic-release-15.6.3 greenkeeper/semantic-release-15.7.0 greenkeeper/semantic-release-15.7.1 greenkeeper/semantic-release-15.7.2 greenkeeper/semantic-release-15.8.0 greenkeeper/semantic-release-15.8.1 greenkeeper/semantic-release-15.9.1 greenkeeper/semantic-release-15.9.2 greenkeeper/semantic-release-15.9.3 greenkeeper/semantic-release-15.9.5 greenkeeper/semantic-release-15.9.6 greenkeeper/semantic-release-15.9.7 greenkeeper/semantic-release-15.9.8 greenkeeper/semantic-release-15.9.9 greenkeeper/sitemap-generator-8.1.1 greenkeeper/sitemap-generator-8.2.0 greenkeeper/sitemap-generator-8.2.1 greenkeeper/sitemap-generator-8.2.2 greenkeeper/sitemap-generator-8.3.0 greenkeeper/source-map-explorer-1.6.0 greenkeeper/supertest-3.1.0 greenkeeper/swagger-jsdoc-1.10.0 greenkeeper/swagger-jsdoc-1.10.1 greenkeeper/swagger-jsdoc-1.10.2 greenkeeper/swagger-jsdoc-1.10.3 greenkeeper/swagger-jsdoc-3.0.0 greenkeeper/swagger-jsdoc-3.0.1 greenkeeper/swagger-jsdoc-3.0.2 greenkeeper/swagger-ui-express-3.0.9 greenkeeper/swagger-ui-express-3.0.10 greenkeeper/systemjs-0.21.4 greenkeeper/ts-jest-22.4.6 greenkeeper/ts-jest-23.0.0 greenkeeper/ts-jest-23.0.1 greenkeeper/ts-jest-23.1.0 greenkeeper/ts-jest-23.1.1 greenkeeper/ts-jest-23.1.2 greenkeeper/ts-jest-23.1.3 greenkeeper/ts-jest-23.1.4 greenkeeper/ts-node-6.0.4 greenkeeper/ts-node-6.0.5 greenkeeper/ts-node-6.1.0 greenkeeper/ts-node-6.1.1 greenkeeper/ts-node-6.1.2 greenkeeper/ts-node-6.2.0 greenkeeper/ts-node-7.0.0 greenkeeper/ts-node-7.0.1 greenkeeper/tsickle-0.29.0 greenkeeper/tsickle-0.30.0 greenkeeper/tsickle-0.31.0 greenkeeper/tsickle-0.32.0 greenkeeper/tsickle-0.32.1 greenkeeper/tslint-immutable-4.6.0 greenkeeper/tslint-immutable-4.7.0 greenkeeper/typedi-0.8.0 greenkeeper/@types/browser-sync-0.0.41 greenkeeper/@types/express-4.16.0 greenkeeper/@types/jest-23.0.0 greenkeeper/@types/jest-23.0.1 greenkeeper/@types/jest-23.0.2 greenkeeper/@types/jest-23.1.0 greenkeeper/@types/jest-23.1.1 greenkeeper/@types/jest-23.1.2 greenkeeper/@types/jest-23.1.3 greenkeeper/@types/jest-23.1.4 greenkeeper/@types/jest-23.1.5 greenkeeper/@types/jest-23.1.6 greenkeeper/@types/jest-23.3.1 greenkeeper/@types/jsdom-11.0.5 greenkeeper/@types/jsdom-11.0.6 greenkeeper/@types/quill-1.3.7 greenkeeper/@types/quill-1.3.8 greenkeeper/@types/quill-1.3.9 greenkeeper/@types/request-2.47.1 greenkeeper/@types/supertest-2.0.5 greenkeeper/@types/ws-5.1.2 greenkeeper/@types/ws-6.0.0 greenkeeper/@types/yargs-11.1.0 greenkeeper/@types/yargs-11.1.1 greenkeeper/url-parse-1.4.1 greenkeeper/url-parse-1.4.3 greenkeeper/ws-5.2.0 greenkeeper/ws-5.2.1 greenkeeper/ws-5.2.2 greenkeeper/ws-6.0.0 greenkeeper/yargs-12.0.1 master server-testing
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
21 lines (16 sloc) 545 Bytes
import { Inject, Injectable, PLATFORM_ID } from '@angular/core'
import { isPlatformBrowser, isPlatformServer } from '@angular/common'
export interface IPlatformService {
readonly isBrowser: boolean
readonly isServer: boolean
}
@Injectable()
export class PlatformService implements IPlatformService {
constructor( @Inject(PLATFORM_ID) private platformId: any) { }
public get isBrowser(): boolean {
return isPlatformBrowser(this.platformId)
}
public get isServer(): boolean {
return isPlatformServer(this.platformId)
}
}