score:1
Accepted answer
You are right, the rewriting of the styles and addition of the attributes is to simulate style encapsulation similar to shadow DOM.
Angular doesn't add these attributes to HTML that is added dynamically.
As workaround this should work:
:host >>> .host-root {
color: purple;
}
:host >>> .circlemy {
fill: blue;
}
This way the selector is treated like to everything within <root>
(template or children) that matches .host-root
the styles will be applied.
Source: stackoverflow.com
Related Query
- Unable to use CSS from Angular2 Dart application (CSS shim)
- unable to use the data from d3.csv() outside of the .get clause
- Use components from local npm repository in an Angular 2 application
- How to get maximum value from an array of objects to use in d3.scale.linear().domain()
- How do I use d3.domain to get d3.min and d3.max from multiple columns in a JSON file?
- Use an IIFE approach and pass a variable from one file to another
- Using CSS Grid, scroll a div from anywhere (w/out using jQuery plugins)
- How to use python pandas to get intersection of sets from a csv file
- Unable to reference d3.js data imported from a csv file with spaces in the header
- Unable to Apply CSS style to SVG text element
- Angular2 D3 - CSS styling is not applied
- Unable to Delete links from a D3 force directed graph with arrows
- Saving value from HTML form to use in d3
- I'm unable to remove correctly a node from a D3 force graph
- How to Use D3 to Angular Project from Bower Install D3
- Use PhantomJS crowbar to extract D3-created SVG from webpage on local webserver
- Use d3 library to read from json file?
- Use elements from a predefined list as variables on a JavaScript function
- How do I convert strings from csv in d3.js and be able to use them as a dataset?
- Remove Cells from D3 Observable When Embedding into Application
- Obtain width from CSS class before element appended?
- How to load a json from externally to a D3 application
- getting json data from localhost to use in D3
- d3.js: how to use data from the parent node? (to show the grouped bar name at the individual bar tooltip)
- how to convert data selected from a postgres database to json or csv to use it with d3js lib?
- "Cartograms with d3 " how to use data from MySQL?
- Word cloud unable to use onClick
- In Meteor, how can I import data from a .tsv file to use in a d3.js chart?
- How to use drag behavior from d3js with leapjs
- How to use attr fill with scalesqrt using data from another json file?
More Query from same tag
- Marimekko chart cell titles not updating
- D3 js bbox not forming in v7
- Loading D3 from a local variable
- What does d3.select(this) return?
- Transitions using line graph and Rickshaw
- Modify HTML contents for updating nodes in D3js?
- Remove overlapping dots from chart
- NVD3 add a border/stroke to area chart
- Is it possible to draw dates per line?
- D3 Dynamically Changing Tick Format
- how to add legend to a pie chart using D3js? And how to centralise the pie chart?
- How do you create a treemap in D3 with custome colors
- Using c3 js, Is there a way to show more x-axis values when zooming in?
- d3js grouped bar chart, is this possible?
- d3.js get JSON from url
- How to get the width and height of an image? ( getBBox() size of SVG return 0 )
- unable to horizontal draw reference line nvd3 bubble chart
- Any good client-side open-source dashboard framework?
- d3js area chart with json
- How to create a grouping key in D3js that is a combination of two JSON attributes
- how to deal with OnChanges that requires an AfterViewInit
- How to place the bars of a bar chart in the right positions of the xAxis using d3.js?
- Examples of Scientific Data representation through D3.js
- Probability density function with javascript d3 and dc
- D3.js js collapsible tree is not opening in browser
- Missing a step for d3 connecting data in choropleth map
- HTML element hides D3.js SVG
- How to calculate the average by multiple keys using a tool like d3.js
- d3 js graph not displaying line
- D3 unexpected identifier