true to yes

Handling Boolean Types on Angular with Pipe

This post shows you how you can handle .NET Boolean types on Angular client using Pipe. The Pipe formerly known as Filter in AngularJs is an Angular (2,3,4) framework feature that helps transform data. Here goes a very simple pipe which converts a boolean value to a specific Yes/No string. import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'questionableBoolean' }) export class QuestionableBooleanPipe implements PipeTransform { transform(value: boolean): string { return value == true ? 'Yes' : 'No' }; } Next, make the questionableBoolean pipe globally available so that you can use it…

Keep reading