In Angular2 v4 I have an array with multiple items. For example:
const array = ['1', '2', '3'];
array.forEach(h => {
this.htmlhistory.concat('hello <br>');
});
the htmlhistory item is a string
and in my html component I have this:
<div>
{{ this.htmlhistory }}
</div>
So the result have to be:
<div>
hello <br>
hello <br>
hello <br>
</div>
BUT this doesn't works... What I'm doing wrong?
Is there anothes solution without using *ngFor?
I need a solution in the component.ts file ... not in the html file
Please help