I'm working on my web-app and I am facing a problem.
I have an array with several values, which I'd like to display in the frontend as list or something similar.
app.component.ts
in this function I split the tags from the string into an array
splitTags() {
if (this.data.tags != null) {
var tag = this.data.tags.split(";")
console.log(tag)
}
}
ngOnInit() {
this.splitTags()
}
app.component.html
here I d'like to display the tags in a list
<li *ngFor="let tag in tags">
{{ tag }}
</li>
but nothing appears, also if I see the values in the console.
ofnotin:<li *ngFor="let tag of tags">