7 UpperCasePipe

Angular 7 Pipes - Capitalize a String using TitleCasePipe

Transforms text to title case. Capitalizes the first letter of each word of a string, and transforms the rest of the word to lower case.

Syntax looks like:
 TitleCasePipe :    {{ expression | titlecase }}
 LowerCasePipe : {{ expression | lowercase }}
 UpperCasePip :   {{ expression | uppercase }}

It looks like:
<p>{{'hello anil' | titlecase}}</p> <!-- output will be "Hello Anil" -->
<p>{{'Hello Anil' | lowercase}}</p> <!-- output will be "hello anil" -->
<p>{{'hello anil' | uppercase}}</p> <!-- output will be "HELLO ANIL" -->


Useful Built-in Pipes in Angular 7 or Above:
1.      Async Pipe
2.      Currency Pipe
3.      Date Pipe
4.      Slice Pipe
5.      Decimal Pipe
6.      Json Pipe
7.      Percent Pipe
8.      LowerCase Pipe
9.      UpperCase Pipe

Example:
import { Component } from '@angular/core';

@Component({
    selector: 'app-root',
    template: `
    <div>
        <h2>TitleCase, LowerCase & UpperCase Pipes</h2>
        <p> {{message | titlecase}} </p>
        <p> {{message | lowercase}} </p>
        <p> {{message | uppercase}} </p>
    </div>
    `
})

export class AppComponent {
  message: string = "Hello, I am Anil!";
}
ANIL SINGH

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog - https://www.code-sample.com/
My Books - Book 1 and Book 2

Angular 7 Pipes - Capitalize a String using TitleCasePipe  Angular 7 Pipes - Capitalize a String using TitleCasePipe Reviewed by Anil Singh on 4:08 AM Rating: (5)
www.code-sample.com/. Powered by Blogger.
^