angular - How do you reference "this" in an Angular2 component template? -


i have angular2 component:

class {   filter(..) } 

in template a, have

<.. list | pipe:filter ..> 

inside of pipe call filter, problem not have reference "this", since js dynamically scoped can't access instance variables of inside of filter when call it. there way "this" reference?

you shouldn't need this. should able call filter() , should interpolated without need this. need put in {{ }} i.e.

{{list | pipe:filter()}} 

here's plunker


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -