Posts

Showing posts with the label string pipe in angular 17

String pipe | Standalone | Angular 17

Image
 Do you know how to use String pipe in Angular 17 ?          Pipes are basically used to change the format of the content we are displaying , in this there are different kinds of pipes are there. One of the type is String Pipe in this string we creating our own format for displaying the content ( i.e, user-name, menu-name etc,. ).  Here the steps to create our own String Pipe Angular 17 : Step 1 : Create a file in the format of your-file-name.pipe.ts in  src/app of your project. Step 2 : Create your own formatter's are use the example given below.  import { Pipe , PipeTransform } from '@angular/core' @ Pipe ({     name : 'string' ,     standalone : true }) export class StringPipe implements PipeTransform {     transform ( value : string , operation : string ) : string {         switch ( operation ) {           case 'uppercase' :       ...