Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Qarun-Qadir-Bissoondial/b283407ce0341d5a27ae0dcf546607f7 to your computer and use it in GitHub Desktop.
Save Qarun-Qadir-Bissoondial/b283407ce0341d5a27ae0dcf546607f7 to your computer and use it in GitHub Desktop.
Pipes Demo - Text-based pipes
import { Component } from '@angular/core';
@Component({
selector: 'app-text-based-pipes',
template: `
<h2>Text-based Pipes!</h2>
<p>This is our string: {{text}}</p>
<br>
<p>Uppercase Pipe -> {{text | uppercase}}</p>
<p>Lowercase Pipe -> {{text | lowercase}}</p>
<p>Titlecase Pipe -> {{text | titlecase}}</p>
`,
styleUrls: []
})
export class TextBasedPipesComponent {
text: string = 'My sTriNg to ChANge!';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment