Angular 10 isPlatformWorkerApp API Last Updated : 14 Jun, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report 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 Return Value: It returns a Boolean Value stating whether a platform id represents a worker app platform. Approach: Create an Angular app that to be used.Import isPlatformWorkerApp 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 { isPlatformWorkerUi } from '@angular/common'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: [ './app.component.css' ] }) export class AppComponent { isWorker: boolean; constructor( @Inject(PLATFORM_ID) platformId: Object) { this.isWorker = isPlatformWorkerUi(platformId); console.log(this.isWorker); } } Output: Example 2: app.component.ts import { Component, Inject } from '@angular/core'; import { PLATFORM_ID } from '@angular/core'; import { isPlatformWorkerUi } from '@angular/common'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: [ './app.component.css' ] }) export class AppComponent { isWorker: boolean; constructor( @Inject(PLATFORM_ID) platformId: Object) { this.isWorker = isPlatformWorkerUi(platformId); } } app.component.html <div *ngIf = 'isWorker==false'> platform id does not represents a web worker UI platform. </div> Output: Reference: https://angular.io/api/common/isPlatformWorkerApp Comment More infoAdvertise with us Next Article Angular10 isPlatformBrowser() Function T taran910 Follow Improve Article Tags : Web Technologies AngularJS Angular10 AngularJS-API Similar Reads 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 Angular10 isPlatformServer() Function 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 2 min read 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 Updates in Angular 12 Angular 12 is the latest version of the popular front-end web development framework. Angular released in May 2021 comes with several new features and improvements that enhance the performance, productivity, and stability of the framework. In this article, we will see different key features and impro 5 min read Updates in Angular 11 Angular 11 is released and it has some great features, so let's check them out: Fonts Download Automatically: Angular import font by default. During integration, Angular CLI will download in-line fonts and connect the appliance. Angular automatically provides this with version 11. You simply got to 2 min read Angular Material Stepper Angular Material is a UI component library that is developed by Google so that Angular developers can develop modern applications in a structured and responsive way. By making use of this library, we can greatly increase the user experience of an end-user thereby gaining popularity for our applicati 5 min read Like