Changed if condition

This commit is contained in:
2017-04-05 14:20:52 +02:00
parent b2aca0ad71
commit bde3e0777c
5 changed files with 10 additions and 4 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+3 -1
View File
@@ -160,6 +160,7 @@ var DetailComponent = (function () {
function DetailComponent(dataService, route) {
this.dataService = dataService;
this.route = route;
this.loaded = false;
}
DetailComponent.prototype.ngOnInit = function () {
var _this = this;
@@ -171,6 +172,7 @@ var DetailComponent = (function () {
_this.label = res.labels;
_this.data = res.HOV;
_this.data2 = res.TOE1;
_this.loaded = true;
});
};
DetailComponent = __decorate([
@@ -588,7 +590,7 @@ module.exports = "<div>\r\n\t<line-chart></line-chart>\r\n</div>"
/***/ 673:
/***/ (function(module, exports) {
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"
module.exports = "<div *ngIf=\"loaded\">\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,4 +1,4 @@
<div *ngIf="data">
<div *ngIf="loaded">
<line-chart [label]="label" [data]="data"></line-chart>
<line-chart [label]="label" [data]="data2"></line-chart>
+4
View File
@@ -18,6 +18,8 @@ export class DetailComponent implements OnInit {
public data2:LineData;
public loaded:boolean = false;
constructor(private dataService: DataService,
private route: ActivatedRoute) {}
@@ -34,6 +36,8 @@ export class DetailComponent implements OnInit {
this.data = res.HOV;
this.data2 = res.TOE1;
this.loaded = true;
});
}