I have this custom structural directive,
<div *someDirective>
which shows div, if some condition is satisfied.
Now, I need to do conditional styling:
<div [ngClass]="SelectedProductId !== 0 && *someDirective ? 'w-23' : 'w-30'"
but this obviously throws errors.
It seems like impossible. So my question is, is this possible somehow to achieve at all?
It's not possible.
Workaround would be:
In service create that function. Use it in conditions or .ts files. And if you want to have that logic in a custom pipe, inject that service in it, and use it there.