1

This works:

  @HostBinding('style.width') get w() {
    return this.width ? this.width : '';
  }
  @HostBinding('style.height') get h() {
    return this.height ? this.height : '';
  }

Is there a way to do this with a single @HostBinding?

2

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.