angular: Multiple @HostBinding decorators do not work in 2.3.0

I’m submitting a … (check one with “x”)

[ x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior Multiple @HostBinding decorators re not handled properly. Only last one is used.

Expected behavior All decorators must be used

Minimal reproduction of the problem with instructions Create a component and set multiple HostBindings to single field, like:

@Input()
@HostBinding("style.width.px")
@HostBinding("style.height.px")
@HostBinding("style.min-width.px")
@HostBinding("style.min-height.px")
public size: number = 30;

Only last decorator is used when app is compiled, both in JIT and AoT.

What is the motivation / use case for changing the behavior? Does not work as expected.

Please tell us about your environment: Ubuntu 16.04

  • Angular version: 2.0.X 2.3.0

  • Browser: [all]

  • Language: [TypeScript 2.0.10]

  • Node (for AoT issues): node --version = 4.2.6

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 7
  • Comments: 17 (12 by maintainers)

Most upvoted comments

I think it doesn’t work for any decorator.