Skip to content

Commit

Permalink
Merge pull request #26313 from jhipster/angular-input
Browse files Browse the repository at this point in the history
use input instead of @input
  • Loading branch information
DanielFran authored May 30, 2024
2 parents 00b413b + 289e488 commit f360fb3
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -36,7 +36,7 @@ import { AccountService } from 'app/core/auth/account.service';
selector: '[<%= jhiPrefix %>HasAnyAuthority]',
})
export default class HasAnyAuthorityDirective {
private authorities = signal<string | string[]>([]);
public authorities = input<string | string[]>([], { alias: '<%= jhiPrefix %>HasAnyAuthority' });

private templateRef = inject(TemplateRef<any>);
private viewContainerRef = inject(ViewContainerRef);
Expand All @@ -54,9 +54,4 @@ export default class HasAnyAuthorityDirective {
}
}, { allowSignalWrites: true });
}

@Input()
set <%= jhiPrefix %>HasAnyAuthority(value: string | string[]) {
this.authorities.set(value);
}
}

0 comments on commit f360fb3

Please sign in to comment.