Parth Trivedi Parth Trivedi - 1 year ago 191
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>

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download