import { Pipe , PipeTransform } from '@angular/core' ; import { FormArray } from '@angular/forms' ; @ Pipe ( { name : 'activeProviders' , pure : false } ) export class ActiveProvidersPipe implements PipeTransform { transform ( value , ... args ) { const activeProviderList = [ ] ; for ( const provider of value . getRawValue ( ) ) { if ( provider . config && provider . config . active ) { activeProviderList . push ( provider ) ; } } return activeProviderList ; } }