Parth Trivedi Parth Trivedi - 5 months ago 48
AngularJS Question

Angular2 : Render Html trusted characters &times and &copy

I am facing issue when rendering &times in Component template.

<input [(ngModel)]="toDoModel" type="text">
<button (click)="onClickToDo(toDoModel)">Click me</button>
<li *ngFor="let item of todoList; let i = index">{{item}}
<a (click)="remove(i)">&times</a>


It looks like you forgot to put the ; character at the end of the sequence.

The following will render successfully:

<a (click)="remove(i)">&times;</a>

Plunker for example usage