dart - How to get a reference to a particular component in an Angular2 template -


i know angular2 has @viewquery querylist of components matching given type. there way reference particular component in querylist?

right now, way can think give component "id" field, iterate through querylist , check if identifier 1 want, e.g.:

getcomponentbyid(querylist<hasidfield> querylist, string id) =>     querylist.singlewhere((component) => component.id == id); 

but seems common enough problem seems there should way without adding "id" boilerplate. know component can referenced locally within template using #, there way reference component within class?

currently functionality not exist, see here details on why functionality implement custom filter on hold due potential performance reasons.

so way doing seems right way given functionality available currently, might change framework in alpha.


Comments

Popular posts from this blog

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -