Moved ngIF

This commit is contained in:
2017-04-05 14:17:17 +02:00
parent 24ca7b1c7f
commit b2aca0ad71
7 changed files with 10 additions and 18 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<div class="row">
<div class="col-md-6">
<div *ngIf="data" style="display: block;">
<div style="display: block;">
<canvas baseChart width="400" height="400"
[datasets]="lineChartData"
[labels]="lineChartLabels"
+1 -3
View File
@@ -46,9 +46,7 @@ export class LineChartComponent implements OnInit {
ngOnInit(): void {
//const newDataSet2 = [];
//newDataSet2.push(res.labels.data.slice());
this.lineChartLabels = this.label.data.slice(); //newDataSet2;
this.lineChartLabels = this.label.data.slice();
console.log("Updated labels array");
console.log(this.lineChartLabels);
+1 -1
View File
@@ -1,4 +1,4 @@
<div>
<div *ngIf="data">
<line-chart [label]="label" [data]="data"></line-chart>
<line-chart [label]="label" [data]="data2"></line-chart>
+1 -3
View File
@@ -30,9 +30,7 @@ export class DetailComponent implements OnInit {
.get(id)
.subscribe(res => {
//const newDataSet2 = [];
//newDataSet2.push(res.labels.data.slice());
this.label = res.labels; //newDataSet2;
this.label = res.labels;
this.data = res.HOV;
this.data2 = res.TOE1;