UpperCasePipe

Stable Pipe

What it does

Transforms string to uppercase.

How to use

expression | uppercase

NgModule

CommonModule

Description

Converts value into lowercase string using String.prototype.toUpperCase().

Example

@Component({
  selector: 'lowerupper-pipe',
  template: `<div>
    <label>Name: </label><input #name (keyup)="change(name.value)" type="text">
    <p>In lowercase: <pre>'{{value | lowercase}}'</pre>
    <p>In uppercase: <pre>'{{value | uppercase}}'</pre>
  </div>`
})
export class LowerUpperPipeComponent {
  value: string;
  change(value: string) { this.value = value; }
}

exported from @angular/common/index defined in @angular/common/src/pipes/uppercase_pipe.ts

doc_Angular
2016-10-06 09:47:10
Comments
Leave a Comment

Please login to continue.