Angular10 isPlatformServer() Function Last Updated : 06 Jan, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article, we are going to see what is isPlatformServer in Angular 10 and how to use it. The isPlatformServer is used to get a platform id that represents a server platform Syntax: isPlatformServer(platformId); NgModule: Module used by isPlatformServer is: CommonModule Return Value: returns a Boolean Value stating whether a platform id represents a server platform. Approach: Create the angular app to be usedImport isPlatformServer from @angular/core to the project.In app.component.ts define the object which holds the Boolean value.serve the angular app using ng serve to see the output Example 1: app.component.ts import { Component, Inject } from '@angular/core'; import { PLATFORM_ID } from '@angular/core'; import { isPlatformServer } from '@angular/common'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: [ './app.component.css' ] }) export class AppComponent { isServer: boolean; constructor( @Inject(PLATFORM_ID) platformId: Object) { this.isServer = isPlatformServer(platformId); console.log(this.isServer); } } Output: Example 2: app.component.ts import { Component, Inject } from '@angular/core'; import { PLATFORM_ID } from '@angular/core'; import { isPlatformServer } from '@angular/common'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: [ './app.component.css' ] }) export class AppComponent { isServer: boolean; constructor( @Inject(PLATFORM_ID) platformId: Object) { this.isServer = isPlatformServer(platformId); } } >app.component.html <div *ngIf = 'isServer==false'> platform id does not represents a server platform. </div> Output: Reference: https://angular.io/api/common/isPlatformServer Comment More infoAdvertise with us Next Article Angular10 isPlatformServer() Function T taran910 Follow Improve Article Tags : Web Technologies AngularJS AngularJS-Function Angular10 Similar Reads Angular10 isPlatformBrowser() Function In this article, we are going to see what is isPlatformBrowser in Angular 10 and how to use it. The isPlatformBrowser is used to get a platform id that represents a browser platform Syntax: isPlatformBrowser(platformId); NgModule: Module used by isPlatformBrowser is: CommonModule Return Value: retur 1 min read Angular 10 isPlatformWorkerUi API In this article, we are going to see what is isPlatformWorkerUi in Angular 10 and how to use it. The isPlatformWorkerUi API is used to get a platform id that represents a web worker UI platform. Syntax: isPlatformWorkerUi( platformId ); NgModule: Module used by isPlatformWorkerUi is: CommonModule Re 2 min read Angular 10 isPlatformWorkerApp API In this article, we are going to see what is isPlatformWorkerApp in Angular 10 and how to use it. The isPlatformWorkerApp API is used to get a platform id that represents a worker app platform. Syntax: isPlatformWorkerApp( platformId ); NgModule: Module used by isPlatformWorkerApp is: CommonModule R 2 min read AngularJS angular.isElement() Function The angular.isElement() Function in AngularJS is used to determine if the parameter inside isElement function is a HTML DOM element or not. It returns true if the reference is a DOM element or else false. Syntax: angular.isElement(value)Parameter: value: It is used to validate whether the passed ar 2 min read Introduction to Angular Universal In the last few years, Angular become one of the most famous front-end framework to develop single page application. Most of the people think Angular only works on client-side but its partially true as there is one concept in Angular which explain some part of the application to be rendered at serve 4 min read Like