question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular Documentation css property "backgroundColor" is wrong

See original GitHub issue

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

In Angular Doc https://angular.io/docs/ts/latest/guide/ngmodule.html

Under heading “Declare directives and components”. There is an example of file app/highlight.directive.ts that sets the background color of element by using

renderer.setElementStyle(el.nativeElement, ‘backgroundColor’, ‘gold’);

Problem is there isn’t any such property known as “backgroundColor”. Its actually “background-color”.

Please correct your documentation.

Please tell us about your environment:

  • Angular version: 2.0.X

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

0reactions
angular-automatic-lock-bot[bot]commented, Sep 10, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

unable to change the background color in Angular using style ...
Angular property binding expects an expression instead of a value which you are trying to assign. Instead of [style.backgroundColor]='red' ...
Read more >
background-color - CSS: Cascading Style Sheets | MDN
The background-color CSS property sets the background color of an element.
Read more >
Component styles - Angular
One way to do this is to set the styles property in the component metadata. The styles property takes an array of strings...
Read more >
UI & Styling - NativeScript Docs
Additionally, NativeScript 5.0 exposes a property iosOverflowSafeArea that can ... Using backgroundColor (CSS: background-color ) & color to change the ...
Read more >
CSS background-color Property - W3docs
CSS background-color property sets an element background color. The background of an element is the total size of it which includes padding and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found