⊗jsagPmPpLw 53 of 97 menu

Converting to lowercase via channel in Angular

Using the LowerCasePipe pipe, you can convert a string to lowercase. Let's try it in practice. Let's say we have the following string in the component class:

export class AppComponent { name: string = 'JOHN'; }

Let's output our string in the template file, using our channel in it:

<div> {{ name | lowercase }} </div>

Result of code execution:

<div> john </div>

Let's say you have an array:

export class AppComponent { products: string[] = ['Milk', 'Bananas', 'Fish', 'Bread']; }

Print each element of the array in lowercase.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline