Styles in component for D3.js do not show in angular 2
问题 I am using Angular 2 and D3.js. I want to show a red rectangle. It only works if I put styles in the style.css file. Check this plunkr When I put my styles in the component styles: [] , it does not work. Check this plunkr How to let it work when I use the component styles: [] ? Thanks UPDATE: @micronyks provides a solution, but it makes the styles in the component global, basically no difference with writing in style.css file. In this plunkr, it shows style in one component will override