Reputation: 391
I referred so many references, but not getting any responses. Thats y i came here to develop my code through yours.
Have to append the element with the text on click. It works and appends inside the ul element as li element with text. But i want to disable or stop the child event. Since i wrote the onclick on parent element only. It should not be click able on the child element. Please help on this.
Sharing the url :
Upvotes: 0
Views: 159
Reputation: 3204
I have studied your code and found the problem. The ul
is the parent element and must be referenced by abcd
and the click handler on first li
that is responsible for adding child receives the event.
<div hostbinding color="white">{{name}}</div>
<h1>Hello {{thingTwo}}</h1>
<ul #abcd>
<li (click) = "dasdas($event)" >Click here to add li</li>
</ul>
Upvotes: 1