diff --git a/generators/angular/templates/src/main/webapp/app/shared/auth/has-any-authority.directive.ts.ejs b/generators/angular/templates/src/main/webapp/app/shared/auth/has-any-authority.directive.ts.ejs index 3b57985c6a93..74e380247f4e 100644 --- a/generators/angular/templates/src/main/webapp/app/shared/auth/has-any-authority.directive.ts.ejs +++ b/generators/angular/templates/src/main/webapp/app/shared/auth/has-any-authority.directive.ts.ejs @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. -%> -import { Directive, inject, Input, TemplateRef, ViewContainerRef, effect, signal, computed } from '@angular/core'; +import { Directive, inject, input, TemplateRef, ViewContainerRef, effect, computed } from '@angular/core'; import { AccountService } from 'app/core/auth/account.service'; @@ -36,7 +36,7 @@ import { AccountService } from 'app/core/auth/account.service'; selector: '[<%= jhiPrefix %>HasAnyAuthority]', }) export default class HasAnyAuthorityDirective { - private authorities = signal([]); + public authorities = input([], { alias: '<%= jhiPrefix %>HasAnyAuthority' }); private templateRef = inject(TemplateRef); private viewContainerRef = inject(ViewContainerRef); @@ -54,9 +54,4 @@ export default class HasAnyAuthorityDirective { } }, { allowSignalWrites: true }); } - - @Input() - set <%= jhiPrefix %>HasAnyAuthority(value: string | string[]) { - this.authorities.set(value); - } }