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
File diff suppressed because one or more lines are too long
+4 -8
View File
@@ -168,9 +168,7 @@ var DetailComponent = (function () {
this.dataService
.get(id)
.subscribe(function (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;
});
@@ -478,9 +476,7 @@ var LineChartComponent = (function () {
this.lineChartType = 'line';
}
LineChartComponent.prototype.ngOnInit = function () {
//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);
var newDataSet = [];
@@ -578,7 +574,7 @@ module.exports = "<div class=\"container\">\r\n\r\n <nav class=\"navbar navbar-
/***/ 671:
/***/ (function(module, exports) {
module.exports = "<div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <div *ngIf=\"data\" style=\"display: block;\">\r\n <canvas baseChart width=\"400\" height=\"400\"\r\n [datasets]=\"lineChartData\"\r\n [labels]=\"lineChartLabels\"\r\n [options]=\"lineChartOptions\"\r\n [colors]=\"lineChartColors\"\r\n [legend]=\"lineChartLegend\"\r\n [chartType]=\"lineChartType\"></canvas>\r\n </div>\r\n </div>\r\n</div>"
module.exports = "<div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <div style=\"display: block;\">\r\n <canvas baseChart width=\"400\" height=\"400\"\r\n [datasets]=\"lineChartData\"\r\n [labels]=\"lineChartLabels\"\r\n [options]=\"lineChartOptions\"\r\n [colors]=\"lineChartColors\"\r\n [legend]=\"lineChartLegend\"\r\n [chartType]=\"lineChartType\"></canvas>\r\n </div>\r\n </div>\r\n</div>"
/***/ }),
@@ -592,7 +588,7 @@ module.exports = "<div>\r\n\t<line-chart></line-chart>\r\n</div>"
/***/ 673:
/***/ (function(module, exports) {
module.exports = "<div>\r\n\t<line-chart [label]=\"label\" [data]=\"data\"></line-chart>\r\n\r\n <line-chart [label]=\"label\" [data]=\"data2\"></line-chart>\r\n</div>\r\n"
module.exports = "<div *ngIf=\"data\">\r\n\t<line-chart [label]=\"label\" [data]=\"data\"></line-chart>\r\n\r\n <line-chart [label]=\"label\" [data]=\"data2\"></line-chart>\r\n</div>\r\n"
/***/ }),
+1 -1
View File
File diff suppressed because one or more lines are too long
+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;