diff --git a/generators/angular/templates/src/main/webapp/app/shared/filter/filter.component.html.ejs b/generators/angular/templates/src/main/webapp/app/shared/filter/filter.component.html.ejs
index 6494027478f7..17e18fad173c 100644
--- a/generators/angular/templates/src/main/webapp/app/shared/filter/filter.component.html.ejs
+++ b/generators/angular/templates/src/main/webapp/app/shared/filter/filter.component.html.ejs
@@ -1,11 +1,11 @@
-@if (filters.hasAnyFilterSet()) {
+@if (filters().hasAnyFilterSet()) {
__jhiTranslateTag__('entity.filters.set')
- @for (filterOption of filters.filterOptions; track filterOption.name) {
+ @for (filterOption of filters().filterOptions; track filterOption.name) {
@for (value of filterOption.values; track value) {
-
{{ filterOption.name }}: {{ value }}
diff --git a/generators/angular/templates/src/main/webapp/app/shared/filter/filter.component.ts.ejs b/generators/angular/templates/src/main/webapp/app/shared/filter/filter.component.ts.ejs
index 84490389bdcb..10602ababd6d 100644
--- a/generators/angular/templates/src/main/webapp/app/shared/filter/filter.component.ts.ejs
+++ b/generators/angular/templates/src/main/webapp/app/shared/filter/filter.component.ts.ejs
@@ -1,4 +1,4 @@
-import { Component, Input } from '@angular/core';
+import { Component, input } from '@angular/core';
import { IFilterOptions } from './filter.model';
import SharedModule from '../shared.module';
@@ -8,13 +8,13 @@ import SharedModule from '../shared.module';
templateUrl: './filter.component.html',
})
export default class FilterComponent {
- @Input() filters!: IFilterOptions;
+ readonly filters = input.required();
clearAllFilters(): void {
- this.filters.clear();
+ this.filters().clear();
}
clearFilter(filterName: string, value: string): void {
- this.filters.removeFilter(filterName, value);
+ this.filters().removeFilter(filterName, value);
}
}