Angular able pipe - how to use 'or' between subjects? #706
Replies: 1 comment
-
I'd recommend to rewrite from pipes to Anyway, those pipes are deprecated |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! I'm using ablePure pipe to check permissions in my template in the following way:
*ngIf="(appAction.Edit | ablePure: appSubject.CustomerDetails:'addresses':'phone':'mobilePhone' | async)"
This returns true if user can edit all of the following fields: 'addresses', 'phone' and 'mobilePhone' of CustomerDetails. I also need to check if user can edit at least one of these fields. Splitting them into three calls of ablePure pipe makes the code look messy (in my use case there are 6 fields, not only three). Is there any method to write this check in a concise way?
Beta Was this translation helpful? Give feedback.
All reactions