There is a directive, the essence of which is to hide the element if the user is a restaurant. So, it works only when there is no ng-show in the child block, since it all works with display none, block
WhenUserDirective.$inject = ['AuthService']; function WhenUserDirective(AuthService) { return { restrict: 'A', link: function (scope, element, attrs) { if (AuthService.isRest()) { element.hide(); } } } } How to make sure that the element is not rendered, if the condition is satisfied, now it is just hiding?
And this is not the best solution, because an advanced user can look at the code and put display: block , but somehow I don’t want to write ng-if everywhere