How to refer css class in a component.ts fileHow to horizontally center a <div>?Set cellpadding and cellspacing in CSS?How do I give text or an image a transparent background using CSS?How to disable text selection highlighting?Is there a CSS parent selector?When to use margin vs padding in CSSChange an HTML5 input's placeholder color with CSSHow do CSS triangles work?How do I vertically center text with CSS?Is it possible to apply CSS to half of a character?
Who goes first? Person disembarking bus or the bicycle?
Is it ok for parents to kiss and romance with each other while their 2- to 8-year-old child watches?
Is it possible to complete a PhD in CS in 3 years?
As a supervisor, what feedback would you expect from a PhD who quits?
Is it okay to use open source code to do an interview task?
Where are the Wazirs?
This LM317 diagram doesn't make any sense to me
Gaining Proficiency in Vehicles (water)
Tesco's Burger Relish Best Before End date number
Passwordless authentication - how and when to invalidate a login code
How do I talk to my wife about unrealistic expectations?
How to slice a string input at a certain unknown index
Strong Password Detection in Python
Draw a diagram with rectangles
Why did Old English lose both thorn and eth?
Is it possible for a character at any level to cast all 44 Cantrips in one week without Magic Items?
Category-theoretic treatment of diffs, patches and merging?
Can one block with a protection from color creature?
Blocks from @ jafe
Computer name naming convention for security
What term do you use for someone who acts impulsively?
What kind of Chinook helicopter/airplane hybrid is this?
Tikz people in diagram
When do flights get cancelled due to fog?
How to refer css class in a component.ts file
How to horizontally center a <div>?Set cellpadding and cellspacing in CSS?How do I give text or an image a transparent background using CSS?How to disable text selection highlighting?Is there a CSS parent selector?When to use margin vs padding in CSSChange an HTML5 input's placeholder color with CSSHow do CSS triangles work?How do I vertically center text with CSS?Is it possible to apply CSS to half of a character?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am trying to create a neural net visualization using d3.js in Angular 7. I have successfully created the nodes but the links are not appearing. The code refers to a css class defined in the components css file. What am I doing wrong?
Shown below is the code responsible for link creation:
// draw links
var link:any = svg.selectAll(".link")
.data(links)
.enter().append("line")
.attr("class", "link")
.attr("x1", function(d) return nodes[d.source].x; )
.attr("y1", function(d) return nodes[d.source].y; )
.attr("x2", function(d) return nodes[d.target].x; )
.attr("y2", function(d) return nodes[d.target].y; )
.style("stroke-width", function(d) return Math.sqrt(d.value); );
css :
.link
stroke: #999;
stroke-opacity: .6;
shown below is the code of my complete neural.component.ts file (which contains the above typescript code).
import Component, OnInit,Input from '@angular/core';
import select,schemeCategory10,scaleOrdinal from 'd3';
import angularMath from 'angular-ts-math';
declare var $:any;
@Component(
selector: 'app-neuralcanvas',
templateUrl: './neuralcanvas.component.html',
styleUrls: ['./neuralcanvas.component.css']
)
export class NeuralcanvasComponent implements OnInit
// color = scaleOrdinal().range(schemeCategory10)
inputLayerHeight = 4;
outputLayerHeight=5;
hiddenLayersDepths =[3,4];
hiddenLayersCount =2;
nodeSize = 17;
width :any = 500 ;
height = 400;
constructor()
ngOnInit()
this.draw()
draw()
console.log('in draw')
if (!select("svg")[0])
else
//clear d3
select('svg').remove();
var svg = select("#neuralNet").append("svg")
.attr("width", this.width)
.attr("height", this.height);
var networkGraph : any = this.buildNodeGraph();
//buildNodeGraph();
this.drawGraph(networkGraph, svg);
buildNodeGraph()
var newGraph:any =
"nodes": []
;
//construct input layer
var newFirstLayer: any = [];
for (var i = 0; i < this.inputLayerHeight; i++)
var newTempLayer1 :any = "label": "i"+i, "layer": 1;
newFirstLayer.push(newTempLayer1);
//construct hidden layers
var hiddenLayers:any = [];
for (var hiddenLayerLoop = 0; hiddenLayerLoop < this.hiddenLayersCount; hiddenLayerLoop++)
var newHiddenLayer:any = [];
//for the height of this hidden layer
for (var i = 0; i < this.hiddenLayersDepths[hiddenLayerLoop]; i++)
var newTempLayer2:any = "label": "h"+ hiddenLayerLoop + i, "layer": (hiddenLayerLoop+2);
newHiddenLayer.push(newTempLayer2);
hiddenLayers.push(newHiddenLayer);
//construct output layer
var newOutputLayer:any = [];
for (var i = 0; i < this.outputLayerHeight; i++)
var newTempLayer3 = "label": "o"+i, "layer": this.hiddenLayersCount + 2;
newOutputLayer.push(newTempLayer3);
//add to newGraph
var allMiddle:any = newGraph.nodes.concat.apply([], hiddenLayers);
newGraph.nodes = newGraph.nodes.concat(newFirstLayer, allMiddle, newOutputLayer );
return newGraph;
drawGraph(networkGraph, svg)
var color = scaleOrdinal(schemeCategory10);
var graph = networkGraph;
var nodes = graph.nodes;
// get network size
var netsize = ;
nodes.forEach(function (d)
if(d.layer in netsize)
netsize[d.layer] += 1;
else
netsize[d.layer] = 1;
d["lidx"] = netsize[d.layer];
);
// calc distances between nodes
var largestLayerSize = Math.max.apply(
null, Object.keys(netsize).map(function (i) return netsize[i]; ));
var xdist = this.width / Object.keys(netsize).length,
ydist = (this.height-15) / largestLayerSize;
// create node locations
nodes.map(function(d)
d["x"] = (d.layer - 0.5) * xdist;
d["y"] = ( ( (d.lidx - 0.5) + ((largestLayerSize - netsize[d.layer]) /2 ) ) * ydist )+10 ;
);
// autogenerate links
var links:any = [];
nodes.map(function(d, i)
for (var n in nodes)
if (d.layer + 1 == nodes[n].layer)
links.push("source": parseInt(i), "target": parseInt(n), "value": 1)
).filter(function(d) return typeof d !== "undefined"; );
// draw links
var link:any = svg.selectAll(".link")
.data(links)
.enter().append("line")
.attr("class", "link")
.attr("x1", function(d) return nodes[d.source].x; )
.attr("y1", function(d) return nodes[d.source].y; )
.attr("x2", function(d) return nodes[d.target].x; )
.attr("y2", function(d) return nodes[d.target].y; )
.style("stroke-width", function(d) return Math.sqrt(d.value); );
// draw nodes
var node = svg.selectAll(".node")
.data(nodes)
.enter().append("g")
.attr("transform", function(d)
return "translate(" + d.x + "," + d.y + ")";
);
var circle = node.append("circle")
.attr("class", "node")
.attr("r", this.nodeSize)
.style("fill", function(d) return color(d.layer); );
node.append("text")
.attr("dx", "-.35em")
.attr("dy", ".35em")
.attr("font-size", ".6em")
.text(function(d) return d.label; );
the code of the neural.component.css:
.link
stroke: #999;
stroke-opacity: .6;
The current output lokks like this:
I want to show the inks as:
As you'll see the generation code is already there I want to know how to refer the class to get the links appearing in Angular 7
css angular d3.js graph
add a comment |
I am trying to create a neural net visualization using d3.js in Angular 7. I have successfully created the nodes but the links are not appearing. The code refers to a css class defined in the components css file. What am I doing wrong?
Shown below is the code responsible for link creation:
// draw links
var link:any = svg.selectAll(".link")
.data(links)
.enter().append("line")
.attr("class", "link")
.attr("x1", function(d) return nodes[d.source].x; )
.attr("y1", function(d) return nodes[d.source].y; )
.attr("x2", function(d) return nodes[d.target].x; )
.attr("y2", function(d) return nodes[d.target].y; )
.style("stroke-width", function(d) return Math.sqrt(d.value); );
css :
.link
stroke: #999;
stroke-opacity: .6;
shown below is the code of my complete neural.component.ts file (which contains the above typescript code).
import Component, OnInit,Input from '@angular/core';
import select,schemeCategory10,scaleOrdinal from 'd3';
import angularMath from 'angular-ts-math';
declare var $:any;
@Component(
selector: 'app-neuralcanvas',
templateUrl: './neuralcanvas.component.html',
styleUrls: ['./neuralcanvas.component.css']
)
export class NeuralcanvasComponent implements OnInit
// color = scaleOrdinal().range(schemeCategory10)
inputLayerHeight = 4;
outputLayerHeight=5;
hiddenLayersDepths =[3,4];
hiddenLayersCount =2;
nodeSize = 17;
width :any = 500 ;
height = 400;
constructor()
ngOnInit()
this.draw()
draw()
console.log('in draw')
if (!select("svg")[0])
else
//clear d3
select('svg').remove();
var svg = select("#neuralNet").append("svg")
.attr("width", this.width)
.attr("height", this.height);
var networkGraph : any = this.buildNodeGraph();
//buildNodeGraph();
this.drawGraph(networkGraph, svg);
buildNodeGraph()
var newGraph:any =
"nodes": []
;
//construct input layer
var newFirstLayer: any = [];
for (var i = 0; i < this.inputLayerHeight; i++)
var newTempLayer1 :any = "label": "i"+i, "layer": 1;
newFirstLayer.push(newTempLayer1);
//construct hidden layers
var hiddenLayers:any = [];
for (var hiddenLayerLoop = 0; hiddenLayerLoop < this.hiddenLayersCount; hiddenLayerLoop++)
var newHiddenLayer:any = [];
//for the height of this hidden layer
for (var i = 0; i < this.hiddenLayersDepths[hiddenLayerLoop]; i++)
var newTempLayer2:any = "label": "h"+ hiddenLayerLoop + i, "layer": (hiddenLayerLoop+2);
newHiddenLayer.push(newTempLayer2);
hiddenLayers.push(newHiddenLayer);
//construct output layer
var newOutputLayer:any = [];
for (var i = 0; i < this.outputLayerHeight; i++)
var newTempLayer3 = "label": "o"+i, "layer": this.hiddenLayersCount + 2;
newOutputLayer.push(newTempLayer3);
//add to newGraph
var allMiddle:any = newGraph.nodes.concat.apply([], hiddenLayers);
newGraph.nodes = newGraph.nodes.concat(newFirstLayer, allMiddle, newOutputLayer );
return newGraph;
drawGraph(networkGraph, svg)
var color = scaleOrdinal(schemeCategory10);
var graph = networkGraph;
var nodes = graph.nodes;
// get network size
var netsize = ;
nodes.forEach(function (d)
if(d.layer in netsize)
netsize[d.layer] += 1;
else
netsize[d.layer] = 1;
d["lidx"] = netsize[d.layer];
);
// calc distances between nodes
var largestLayerSize = Math.max.apply(
null, Object.keys(netsize).map(function (i) return netsize[i]; ));
var xdist = this.width / Object.keys(netsize).length,
ydist = (this.height-15) / largestLayerSize;
// create node locations
nodes.map(function(d)
d["x"] = (d.layer - 0.5) * xdist;
d["y"] = ( ( (d.lidx - 0.5) + ((largestLayerSize - netsize[d.layer]) /2 ) ) * ydist )+10 ;
);
// autogenerate links
var links:any = [];
nodes.map(function(d, i)
for (var n in nodes)
if (d.layer + 1 == nodes[n].layer)
links.push("source": parseInt(i), "target": parseInt(n), "value": 1)
).filter(function(d) return typeof d !== "undefined"; );
// draw links
var link:any = svg.selectAll(".link")
.data(links)
.enter().append("line")
.attr("class", "link")
.attr("x1", function(d) return nodes[d.source].x; )
.attr("y1", function(d) return nodes[d.source].y; )
.attr("x2", function(d) return nodes[d.target].x; )
.attr("y2", function(d) return nodes[d.target].y; )
.style("stroke-width", function(d) return Math.sqrt(d.value); );
// draw nodes
var node = svg.selectAll(".node")
.data(nodes)
.enter().append("g")
.attr("transform", function(d)
return "translate(" + d.x + "," + d.y + ")";
);
var circle = node.append("circle")
.attr("class", "node")
.attr("r", this.nodeSize)
.style("fill", function(d) return color(d.layer); );
node.append("text")
.attr("dx", "-.35em")
.attr("dy", ".35em")
.attr("font-size", ".6em")
.text(function(d) return d.label; );
the code of the neural.component.css:
.link
stroke: #999;
stroke-opacity: .6;
The current output lokks like this:
I want to show the inks as:
As you'll see the generation code is already there I want to know how to refer the class to get the links appearing in Angular 7
css angular d3.js graph
If everything else is good, trystyle.css
at the root. Paste yourcss
there.
– neo
Mar 26 at 4:57
Did you try with style.css?
– GCJAmarasinghe
Mar 26 at 5:36
@AnuradhaMudalige what do you mean by root?
– Suleka_28
Mar 26 at 6:26
1
@Suleka_28 insidesrc
folder at the top level of your project there is a file named asstyle.css
where global style are defined. Try that out.
– neo
Mar 26 at 6:56
add a comment |
I am trying to create a neural net visualization using d3.js in Angular 7. I have successfully created the nodes but the links are not appearing. The code refers to a css class defined in the components css file. What am I doing wrong?
Shown below is the code responsible for link creation:
// draw links
var link:any = svg.selectAll(".link")
.data(links)
.enter().append("line")
.attr("class", "link")
.attr("x1", function(d) return nodes[d.source].x; )
.attr("y1", function(d) return nodes[d.source].y; )
.attr("x2", function(d) return nodes[d.target].x; )
.attr("y2", function(d) return nodes[d.target].y; )
.style("stroke-width", function(d) return Math.sqrt(d.value); );
css :
.link
stroke: #999;
stroke-opacity: .6;
shown below is the code of my complete neural.component.ts file (which contains the above typescript code).
import Component, OnInit,Input from '@angular/core';
import select,schemeCategory10,scaleOrdinal from 'd3';
import angularMath from 'angular-ts-math';
declare var $:any;
@Component(
selector: 'app-neuralcanvas',
templateUrl: './neuralcanvas.component.html',
styleUrls: ['./neuralcanvas.component.css']
)
export class NeuralcanvasComponent implements OnInit
// color = scaleOrdinal().range(schemeCategory10)
inputLayerHeight = 4;
outputLayerHeight=5;
hiddenLayersDepths =[3,4];
hiddenLayersCount =2;
nodeSize = 17;
width :any = 500 ;
height = 400;
constructor()
ngOnInit()
this.draw()
draw()
console.log('in draw')
if (!select("svg")[0])
else
//clear d3
select('svg').remove();
var svg = select("#neuralNet").append("svg")
.attr("width", this.width)
.attr("height", this.height);
var networkGraph : any = this.buildNodeGraph();
//buildNodeGraph();
this.drawGraph(networkGraph, svg);
buildNodeGraph()
var newGraph:any =
"nodes": []
;
//construct input layer
var newFirstLayer: any = [];
for (var i = 0; i < this.inputLayerHeight; i++)
var newTempLayer1 :any = "label": "i"+i, "layer": 1;
newFirstLayer.push(newTempLayer1);
//construct hidden layers
var hiddenLayers:any = [];
for (var hiddenLayerLoop = 0; hiddenLayerLoop < this.hiddenLayersCount; hiddenLayerLoop++)
var newHiddenLayer:any = [];
//for the height of this hidden layer
for (var i = 0; i < this.hiddenLayersDepths[hiddenLayerLoop]; i++)
var newTempLayer2:any = "label": "h"+ hiddenLayerLoop + i, "layer": (hiddenLayerLoop+2);
newHiddenLayer.push(newTempLayer2);
hiddenLayers.push(newHiddenLayer);
//construct output layer
var newOutputLayer:any = [];
for (var i = 0; i < this.outputLayerHeight; i++)
var newTempLayer3 = "label": "o"+i, "layer": this.hiddenLayersCount + 2;
newOutputLayer.push(newTempLayer3);
//add to newGraph
var allMiddle:any = newGraph.nodes.concat.apply([], hiddenLayers);
newGraph.nodes = newGraph.nodes.concat(newFirstLayer, allMiddle, newOutputLayer );
return newGraph;
drawGraph(networkGraph, svg)
var color = scaleOrdinal(schemeCategory10);
var graph = networkGraph;
var nodes = graph.nodes;
// get network size
var netsize = ;
nodes.forEach(function (d)
if(d.layer in netsize)
netsize[d.layer] += 1;
else
netsize[d.layer] = 1;
d["lidx"] = netsize[d.layer];
);
// calc distances between nodes
var largestLayerSize = Math.max.apply(
null, Object.keys(netsize).map(function (i) return netsize[i]; ));
var xdist = this.width / Object.keys(netsize).length,
ydist = (this.height-15) / largestLayerSize;
// create node locations
nodes.map(function(d)
d["x"] = (d.layer - 0.5) * xdist;
d["y"] = ( ( (d.lidx - 0.5) + ((largestLayerSize - netsize[d.layer]) /2 ) ) * ydist )+10 ;
);
// autogenerate links
var links:any = [];
nodes.map(function(d, i)
for (var n in nodes)
if (d.layer + 1 == nodes[n].layer)
links.push("source": parseInt(i), "target": parseInt(n), "value": 1)
).filter(function(d) return typeof d !== "undefined"; );
// draw links
var link:any = svg.selectAll(".link")
.data(links)
.enter().append("line")
.attr("class", "link")
.attr("x1", function(d) return nodes[d.source].x; )
.attr("y1", function(d) return nodes[d.source].y; )
.attr("x2", function(d) return nodes[d.target].x; )
.attr("y2", function(d) return nodes[d.target].y; )
.style("stroke-width", function(d) return Math.sqrt(d.value); );
// draw nodes
var node = svg.selectAll(".node")
.data(nodes)
.enter().append("g")
.attr("transform", function(d)
return "translate(" + d.x + "," + d.y + ")";
);
var circle = node.append("circle")
.attr("class", "node")
.attr("r", this.nodeSize)
.style("fill", function(d) return color(d.layer); );
node.append("text")
.attr("dx", "-.35em")
.attr("dy", ".35em")
.attr("font-size", ".6em")
.text(function(d) return d.label; );
the code of the neural.component.css:
.link
stroke: #999;
stroke-opacity: .6;
The current output lokks like this:
I want to show the inks as:
As you'll see the generation code is already there I want to know how to refer the class to get the links appearing in Angular 7
css angular d3.js graph
I am trying to create a neural net visualization using d3.js in Angular 7. I have successfully created the nodes but the links are not appearing. The code refers to a css class defined in the components css file. What am I doing wrong?
Shown below is the code responsible for link creation:
// draw links
var link:any = svg.selectAll(".link")
.data(links)
.enter().append("line")
.attr("class", "link")
.attr("x1", function(d) return nodes[d.source].x; )
.attr("y1", function(d) return nodes[d.source].y; )
.attr("x2", function(d) return nodes[d.target].x; )
.attr("y2", function(d) return nodes[d.target].y; )
.style("stroke-width", function(d) return Math.sqrt(d.value); );
css :
.link
stroke: #999;
stroke-opacity: .6;
shown below is the code of my complete neural.component.ts file (which contains the above typescript code).
import Component, OnInit,Input from '@angular/core';
import select,schemeCategory10,scaleOrdinal from 'd3';
import angularMath from 'angular-ts-math';
declare var $:any;
@Component(
selector: 'app-neuralcanvas',
templateUrl: './neuralcanvas.component.html',
styleUrls: ['./neuralcanvas.component.css']
)
export class NeuralcanvasComponent implements OnInit
// color = scaleOrdinal().range(schemeCategory10)
inputLayerHeight = 4;
outputLayerHeight=5;
hiddenLayersDepths =[3,4];
hiddenLayersCount =2;
nodeSize = 17;
width :any = 500 ;
height = 400;
constructor()
ngOnInit()
this.draw()
draw()
console.log('in draw')
if (!select("svg")[0])
else
//clear d3
select('svg').remove();
var svg = select("#neuralNet").append("svg")
.attr("width", this.width)
.attr("height", this.height);
var networkGraph : any = this.buildNodeGraph();
//buildNodeGraph();
this.drawGraph(networkGraph, svg);
buildNodeGraph()
var newGraph:any =
"nodes": []
;
//construct input layer
var newFirstLayer: any = [];
for (var i = 0; i < this.inputLayerHeight; i++)
var newTempLayer1 :any = "label": "i"+i, "layer": 1;
newFirstLayer.push(newTempLayer1);
//construct hidden layers
var hiddenLayers:any = [];
for (var hiddenLayerLoop = 0; hiddenLayerLoop < this.hiddenLayersCount; hiddenLayerLoop++)
var newHiddenLayer:any = [];
//for the height of this hidden layer
for (var i = 0; i < this.hiddenLayersDepths[hiddenLayerLoop]; i++)
var newTempLayer2:any = "label": "h"+ hiddenLayerLoop + i, "layer": (hiddenLayerLoop+2);
newHiddenLayer.push(newTempLayer2);
hiddenLayers.push(newHiddenLayer);
//construct output layer
var newOutputLayer:any = [];
for (var i = 0; i < this.outputLayerHeight; i++)
var newTempLayer3 = "label": "o"+i, "layer": this.hiddenLayersCount + 2;
newOutputLayer.push(newTempLayer3);
//add to newGraph
var allMiddle:any = newGraph.nodes.concat.apply([], hiddenLayers);
newGraph.nodes = newGraph.nodes.concat(newFirstLayer, allMiddle, newOutputLayer );
return newGraph;
drawGraph(networkGraph, svg)
var color = scaleOrdinal(schemeCategory10);
var graph = networkGraph;
var nodes = graph.nodes;
// get network size
var netsize = ;
nodes.forEach(function (d)
if(d.layer in netsize)
netsize[d.layer] += 1;
else
netsize[d.layer] = 1;
d["lidx"] = netsize[d.layer];
);
// calc distances between nodes
var largestLayerSize = Math.max.apply(
null, Object.keys(netsize).map(function (i) return netsize[i]; ));
var xdist = this.width / Object.keys(netsize).length,
ydist = (this.height-15) / largestLayerSize;
// create node locations
nodes.map(function(d)
d["x"] = (d.layer - 0.5) * xdist;
d["y"] = ( ( (d.lidx - 0.5) + ((largestLayerSize - netsize[d.layer]) /2 ) ) * ydist )+10 ;
);
// autogenerate links
var links:any = [];
nodes.map(function(d, i)
for (var n in nodes)
if (d.layer + 1 == nodes[n].layer)
links.push("source": parseInt(i), "target": parseInt(n), "value": 1)
).filter(function(d) return typeof d !== "undefined"; );
// draw links
var link:any = svg.selectAll(".link")
.data(links)
.enter().append("line")
.attr("class", "link")
.attr("x1", function(d) return nodes[d.source].x; )
.attr("y1", function(d) return nodes[d.source].y; )
.attr("x2", function(d) return nodes[d.target].x; )
.attr("y2", function(d) return nodes[d.target].y; )
.style("stroke-width", function(d) return Math.sqrt(d.value); );
// draw nodes
var node = svg.selectAll(".node")
.data(nodes)
.enter().append("g")
.attr("transform", function(d)
return "translate(" + d.x + "," + d.y + ")";
);
var circle = node.append("circle")
.attr("class", "node")
.attr("r", this.nodeSize)
.style("fill", function(d) return color(d.layer); );
node.append("text")
.attr("dx", "-.35em")
.attr("dy", ".35em")
.attr("font-size", ".6em")
.text(function(d) return d.label; );
the code of the neural.component.css:
.link
stroke: #999;
stroke-opacity: .6;
The current output lokks like this:
I want to show the inks as:
As you'll see the generation code is already there I want to know how to refer the class to get the links appearing in Angular 7
css angular d3.js graph
css angular d3.js graph
edited Mar 26 at 4:05
Suleka_28
asked Mar 25 at 22:36
Suleka_28Suleka_28
9339 silver badges20 bronze badges
9339 silver badges20 bronze badges
If everything else is good, trystyle.css
at the root. Paste yourcss
there.
– neo
Mar 26 at 4:57
Did you try with style.css?
– GCJAmarasinghe
Mar 26 at 5:36
@AnuradhaMudalige what do you mean by root?
– Suleka_28
Mar 26 at 6:26
1
@Suleka_28 insidesrc
folder at the top level of your project there is a file named asstyle.css
where global style are defined. Try that out.
– neo
Mar 26 at 6:56
add a comment |
If everything else is good, trystyle.css
at the root. Paste yourcss
there.
– neo
Mar 26 at 4:57
Did you try with style.css?
– GCJAmarasinghe
Mar 26 at 5:36
@AnuradhaMudalige what do you mean by root?
– Suleka_28
Mar 26 at 6:26
1
@Suleka_28 insidesrc
folder at the top level of your project there is a file named asstyle.css
where global style are defined. Try that out.
– neo
Mar 26 at 6:56
If everything else is good, try
style.css
at the root. Paste your css
there.– neo
Mar 26 at 4:57
If everything else is good, try
style.css
at the root. Paste your css
there.– neo
Mar 26 at 4:57
Did you try with style.css?
– GCJAmarasinghe
Mar 26 at 5:36
Did you try with style.css?
– GCJAmarasinghe
Mar 26 at 5:36
@AnuradhaMudalige what do you mean by root?
– Suleka_28
Mar 26 at 6:26
@AnuradhaMudalige what do you mean by root?
– Suleka_28
Mar 26 at 6:26
1
1
@Suleka_28 inside
src
folder at the top level of your project there is a file named as style.css
where global style are defined. Try that out.– neo
Mar 26 at 6:56
@Suleka_28 inside
src
folder at the top level of your project there is a file named as style.css
where global style are defined. Try that out.– neo
Mar 26 at 6:56
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55347372%2fhow-to-refer-css-class-in-a-component-ts-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55347372%2fhow-to-refer-css-class-in-a-component-ts-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
If everything else is good, try
style.css
at the root. Paste yourcss
there.– neo
Mar 26 at 4:57
Did you try with style.css?
– GCJAmarasinghe
Mar 26 at 5:36
@AnuradhaMudalige what do you mean by root?
– Suleka_28
Mar 26 at 6:26
1
@Suleka_28 inside
src
folder at the top level of your project there is a file named asstyle.css
where global style are defined. Try that out.– neo
Mar 26 at 6:56