has-any-authorithy directive in jhipster application
问题 I have created a new role ROLE_SUPERUSER in my jhipster application. I want a specific navbar menu to be visible to only admin and my new user. I tried using has-any-authorithy as given in authority.directive.js but its not working. I am using it in HTML like has-any-authorithy="['ROLE_ADMIN','ROLE_SUPERUSER']" Am I missing anything? 回答1: Code says: authorities = attrs.hasAnyAuthority.replace(/\s+/g, '').split(','); So it seems that the directive expects one string and not an array. Try this: