When using @HostBinding
on shorthand CSS grid properties (e.g. using grid-row
instead of grid-row-start
and grid-row-end
) the bindings don't work:
export class MyComponent {
@HostBinding('style.grid-row')
row = '1 / 2';
}
However using the individual properties does work:
export class MyComponent {
@HostBinding('style.grid-row-start')
row = 1;
@HostBinding('style.grid-row-end')
row = 2;
}
Is this intentional or a bug with Angular? Of course a work around is to just not use the shorthand properties.
Stackblitz: https://stackblitz.com/edit/angular-qfotyg