Angular 2 LowerCase Pipe Example - LearnHowToCode SarkariResult.com Interview Questions and Answers LearnHowToCodeOnline
Angular 2 LowerCase Pipe Example

Angular 2 LowerCase Pipe Example

Angular 2  LowerCase Pipe Example

LowerCasePipe

LowerCasePipe is a PIPE that transforms string to lowercase. It relates to CommonModule. Find the syntax of LowerCasePipe as below.

expression | lowercase 

The expression result will be converted into lowercase. Find the example. 

lowercasepipe.component.ts

import {Component} from '@angular/core';
@Component({
    selector: 'lowercasepipe-app',
    template: `
             <b>lowercase pipe demo</b> <br/>
    
      {{address.village | lowercase}}
      <p [textContent] ="address.district | lowercase" > </p>
      <input (input) = "setMsg($event.target.value)">
      {{message | lowercase}}
      `
})
export class LowerCasePipeComponent { 
        message : string;
 address = {
     village : 'Dhananjaypur',
     district: 'Varanasi'
 }
 setMsg(data:string) {
    this.message = data;
 }
}  

About Mariano

I'm Ethan Mariano a software engineer by profession and reader/writter by passion.I have good understanding and knowledge of AngularJS, Database, javascript, web development, digital marketing and exploring other technologies related to Software development.

0 comments:

Featured post

Political Full Forms List

Acronym Full Form MLA Member of Legislative Assembly RSS Really Simple Syndication, Rashtriya Swayamsevak Sangh UNESCO United Nations E...

Powered by Blogger.