I defined string list in Component and it's rendering in view like this:
<span class="one" (click)='do($event, index, item)'
*ngFor="let item of result;let index = index" >{{item}} </span>
After each item clicked I want to add div element after that item:
clickedSpan.insertAdjacentHTML('beforeend', '<div >Hi!</div>');
How can I access to elementRef in do function? Or Are there other solutions to manipulate rendered spans which rendered by ngFor?
<span #el (click)="do(el)">-> angular.io/docs/ts/latest/guide/template-syntax.html#!#ref-vars