I'm trying to give categories name to my chip in my Angular application. For the backend i use Spring Boot. I tried a lots to fix this error and i don't know if is a FrontEnd problem or a BackEnd problem. The problem is that now my categories chips appears in this way:
But i want name instead of numbers.
Categories are defined in .\models\category
export enum Category {
MANGA,
DVD,
LIBRI,
COMICS
}
In .\components\categories\categories.component.html
<div class="categories">
<div *ngFor="let category of categories" class="category-item">
<div (click)="handleClick(category)">
<app-chip
value={{category}}
modifier="menu-item"
></app-chip>
</div>
</div>
</div>
And this is my .ts
@Component({
selector: 'app-categories',
templateUrl: './categories.component.html',
styleUrls: ['./categories.component.css']
})
export class CategoriesComponent implements OnInit {
public categories: Category[] = [
Category.MANGA,
Category.DVD,
Category.LIBRI,
Category.COMICS
]
constructor(private observableService: ObservableService) { }
ngOnInit(): void {
}
handleClick(category: Category) {
this.observableService.changeCategory(category);
}
}
As result i want that my categories appears instead of the numbers in the chips.