Open In App

Angular 10 UpperCasePipe

In this article, we are going to see what is UpperCasePipe in Angular 10 and how to use it.

The UpperCasePipe is used to Transforms all the text to uppercase.



Syntax:

{{ value | uppercase }}

NgModule: Module used by UpperCasePipe is:



Approach: 

Input value:

Example 1:




import { Component, OnInit }
        from '@angular/core';
  
@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    // Key Value object
    value : string = 'geeksforgeeks';
  }




<b>
  <div>
    Uppercase value is :
    {{value | uppercase}}
  </div>
</b>

Output:

Example 2:




import { Component, OnInit } 
        from '@angular/core';
  
@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    value : string = 'CamelCase String';
  }




<b>
  <div>
    CamelCase value is : 
    {{value}}
  </div>
  <div>
    Uppercase value is : 
    {{value | uppercase}}
  </div>
</b>

Output:

Reference: https://angular.io/api/common/UpperCasePipe


Article Tags :