angular - How to reference pipe from template in component code -


how reference pipe template in component code? in template

 <tr *ngfor="let score of scores                         | filterscores:modelfilter.value:modelfilter.name"> 

i want retrieve values custom pipe in component can use them in code. if add pipe in constructor create new pipe.

constructor(private filterscorespipe: filterscorespipe) { } 

call transform method pipe's instance.

let filterscorespipe = new filterscorespipe(); filterscorespipe.transform(input, agr1, arg2); 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -