Closed
Description
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
Using HostBinding or NgStyle with platform-server appends the style to the correct element, but does not convert the name of the style to kebab-case as platform-browser does. This leads the browser to not recognize the name of the style.
Expected behavior
The dynamically applied styles should be transferred to the DOM as kebab-case, not camelCase.
Minimal reproduction of the problem with instructions
- Create a component and add a HostBinding for
marginRight
- Use @angular/cli to build a commonjs package
- Render the package using nguniversal/express-engine
- Turn off JS to prevent bootstrapping
- Inspect the DOM to find the component with the incorrect styles
What is the motivation / use case for changing the behavior?
If a user has JS disabled, or if bootstrapping is particularly slow, UX is greatly impacted as styles are not correctly applied throughout the DOM.
Environment
Angular version: 5.0.0-beta.7
Browser:
- [ x ] Chrome (desktop) version 61.0.3163.79
For Tooling issues:
- Node version: 8.5.0
- Platform: Linux