- Notifications
You must be signed in to change notification settings - Fork26.7k
Open
Description
Describe the problem that you experienced
There is no mention of style binding in host field in the decorator.
I checked these two pages:
Enter the URL of the topic with the problem
No response
Describe what you were looking for in the documentation
To have a section about:
@Component({host:{"[style.color]":"control.valid ? 'green': 'red'","[style.width.px]":"500"}})exportclassCp{}
Also it should mention that we can bind css variables in the in host binding
@Component({host:{"[style.--some-color]":"control.valid ? 'green': 'red'",}})exportclassCp{}
Some examples that were converted:
https://angular.dev/api/core/HostBinding#usage-notes
Describe the actions that led you to experience the problem
No response
Describe what you want to experience that would fix the problem
No response
Add a screenshot if that helps illustrate the problem
No response
If this problem caused an exception or error, please paste it here
If the problem is browser-specific, please specify the device, OS, browser, and version
Provide any additional information here in as much as detail as you can