console.log added
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+54
-42
@@ -1,13 +1,12 @@
|
||||
webpackJsonp([1,4],{
|
||||
|
||||
/***/ 333:
|
||||
/***/ 301:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Rx__ = __webpack_require__(674);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_rxjs_Rx___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_rxjs_Rx__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_http__ = __webpack_require__(315);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_http__ = __webpack_require__(283);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__line_data__ = __webpack_require__(455);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return DataService; });
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
@@ -27,29 +26,28 @@ var DataService = (function () {
|
||||
this.baseUrl = 'http://localhost:3000/webapi/data';
|
||||
}
|
||||
DataService.prototype.get = function () {
|
||||
console.log('getting data');
|
||||
var lineChartData$ =
|
||||
//<LineData>( {data: [65, 59, 80, 81, 56, 55, 40], label: 'Series A'} );
|
||||
this.http
|
||||
.get(("" + this.baseUrl), { headers: this.getHeaders() })
|
||||
.map(mapData);
|
||||
return __WEBPACK_IMPORTED_MODULE_1_rxjs_Rx__["Observable"].create(function (observer) {
|
||||
observer.next(lineChartData$);
|
||||
observer.complete();
|
||||
});
|
||||
return lineChartData$;
|
||||
};
|
||||
DataService.prototype.getHeaders = function () {
|
||||
var headers = new __WEBPACK_IMPORTED_MODULE_2__angular_http__["b" /* Headers */]();
|
||||
var headers = new __WEBPACK_IMPORTED_MODULE_1__angular_http__["b" /* Headers */]();
|
||||
headers.append('Accept', 'application/json');
|
||||
return headers;
|
||||
};
|
||||
DataService = __decorate([
|
||||
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Injectable"])(),
|
||||
__metadata('design:paramtypes', [(typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_2__angular_http__["c" /* Http */] !== 'undefined' && __WEBPACK_IMPORTED_MODULE_2__angular_http__["c" /* Http */]) === 'function' && _a) || Object])
|
||||
__metadata('design:paramtypes', [(typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_1__angular_http__["c" /* Http */] !== 'undefined' && __WEBPACK_IMPORTED_MODULE_1__angular_http__["c" /* Http */]) === 'function' && _a) || Object])
|
||||
], DataService);
|
||||
return DataService;
|
||||
var _a;
|
||||
}());
|
||||
function mapData(response) {
|
||||
console.log('mapping data', __WEBPACK_IMPORTED_MODULE_2__line_data__["a" /* LineData */]);
|
||||
return response.json().map(toData);
|
||||
}
|
||||
function toData(r) {
|
||||
@@ -65,7 +63,7 @@ function toData(r) {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 402:
|
||||
/***/ 344:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
function webpackEmptyContext(req) {
|
||||
@@ -74,20 +72,20 @@ function webpackEmptyContext(req) {
|
||||
webpackEmptyContext.keys = function() { return []; };
|
||||
webpackEmptyContext.resolve = webpackEmptyContext;
|
||||
module.exports = webpackEmptyContext;
|
||||
webpackEmptyContext.id = 402;
|
||||
webpackEmptyContext.id = 344;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 403:
|
||||
/***/ 345:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__ = __webpack_require__(490);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(1);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__environments_environment__ = __webpack_require__(513);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__app_app_module__ = __webpack_require__(511);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dynamic__ = __webpack_require__(432);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__environments_environment__ = __webpack_require__(456);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__app_app_module__ = __webpack_require__(453);
|
||||
|
||||
|
||||
|
||||
@@ -100,11 +98,11 @@ __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_platform_browser_dyna
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 510:
|
||||
/***/ 452:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppComponent; });
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
@@ -123,8 +121,8 @@ var AppComponent = (function () {
|
||||
AppComponent = __decorate([
|
||||
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
|
||||
selector: 'app-root',
|
||||
template: __webpack_require__(671),
|
||||
styles: [__webpack_require__(670)]
|
||||
template: __webpack_require__(614),
|
||||
styles: [__webpack_require__(613)]
|
||||
}),
|
||||
__metadata('design:paramtypes', [])
|
||||
], AppComponent);
|
||||
@@ -134,19 +132,19 @@ var AppComponent = (function () {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 511:
|
||||
/***/ 453:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__(217);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(1);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_forms__ = __webpack_require__(481);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__angular_http__ = __webpack_require__(315);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_ng2_charts_ng2_charts__ = __webpack_require__(668);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_platform_browser__ = __webpack_require__(191);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__angular_core__ = __webpack_require__(0);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__angular_forms__ = __webpack_require__(423);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__angular_http__ = __webpack_require__(283);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_ng2_charts_ng2_charts__ = __webpack_require__(611);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_ng2_charts_ng2_charts___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_ng2_charts_ng2_charts__);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app_component__ = __webpack_require__(510);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__chart_component__ = __webpack_require__(512);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__data_service__ = __webpack_require__(333);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__app_component__ = __webpack_require__(452);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__chart_component__ = __webpack_require__(454);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__data_service__ = __webpack_require__(301);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return AppModule; });
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
@@ -191,12 +189,12 @@ var AppModule = (function () {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 512:
|
||||
/***/ 454:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(1);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__data_service__ = __webpack_require__(333);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__angular_core__ = __webpack_require__(0);
|
||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__data_service__ = __webpack_require__(301);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LineChartComponent; });
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
@@ -249,7 +247,7 @@ var LineChartComponent = (function () {
|
||||
LineChartComponent = __decorate([
|
||||
__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__angular_core__["Component"])({
|
||||
selector: 'line-chart',
|
||||
template: __webpack_require__(672)
|
||||
template: __webpack_require__(615)
|
||||
}),
|
||||
__metadata('design:paramtypes', [(typeof (_a = typeof __WEBPACK_IMPORTED_MODULE_1__data_service__["a" /* DataService */] !== 'undefined' && __WEBPACK_IMPORTED_MODULE_1__data_service__["a" /* DataService */]) === 'function' && _a) || Object])
|
||||
], LineChartComponent);
|
||||
@@ -260,7 +258,21 @@ var LineChartComponent = (function () {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 513:
|
||||
/***/ 455:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LineData; });
|
||||
var LineData = (function () {
|
||||
function LineData() {
|
||||
}
|
||||
return LineData;
|
||||
}());
|
||||
//# sourceMappingURL=C:/Users/martijn/Documents/GitHub/smarthome/mean-app/src/line-data.js.map
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 456:
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
@@ -276,34 +288,34 @@ var environment = {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 670:
|
||||
/***/ 613:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = "h1 {\r\n\tcolor: blue;\r\n}"
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 671:
|
||||
/***/ 614:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = "<h1>\r\n {{title}}\r\n\r\n <line-chart></line-chart>\r\n</h1>"
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 672:
|
||||
/***/ 615:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
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\"\r\n (chartHover)=\"chartHovered($event)\"\r\n (chartClick)=\"chartClicked($event)\"></canvas>\r\n </div>\r\n </div>\r\n</div>"
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 948:
|
||||
/***/ 628:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(403);
|
||||
module.exports = __webpack_require__(345);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
},[948]);
|
||||
},[628]);
|
||||
//# sourceMappingURL=main.bundle.map
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1281
-1601
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+10
-10
@@ -1,15 +1,15 @@
|
||||
webpackJsonp([2,4],{
|
||||
|
||||
/***/ 405:
|
||||
/***/ 347:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
// style-loader: Adds some css to the DOM by adding a <style> tag
|
||||
|
||||
// load the styles
|
||||
var content = __webpack_require__(664);
|
||||
var content = __webpack_require__(607);
|
||||
if(typeof content === 'string') content = [[module.i, content, '']];
|
||||
// add the styles to the DOM
|
||||
var update = __webpack_require__(946)(content, {});
|
||||
var update = __webpack_require__(626)(content, {});
|
||||
if(content.locals) module.exports = content.locals;
|
||||
// Hot Module Replacement
|
||||
if(false) {
|
||||
@@ -27,10 +27,10 @@ if(false) {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 664:
|
||||
/***/ 607:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
exports = module.exports = __webpack_require__(665)();
|
||||
exports = module.exports = __webpack_require__(608)();
|
||||
// imports
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ exports.push([module.i, "/* You can add global styles to this file, and also imp
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 665:
|
||||
/***/ 608:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/*
|
||||
@@ -99,7 +99,7 @@ module.exports = function() {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 946:
|
||||
/***/ 626:
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/*
|
||||
@@ -352,13 +352,13 @@ function updateLink(linkElement, obj) {
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 950:
|
||||
/***/ 630:
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(405);
|
||||
module.exports = __webpack_require__(347);
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
},[950]);
|
||||
},[630]);
|
||||
//# sourceMappingURL=styles.bundle.map
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2725
-20803
File diff suppressed because it is too large
Load Diff
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@ export class DataService {
|
||||
constructor(private http : Http){}
|
||||
|
||||
get(): Observable<LineData> {
|
||||
|
||||
console.log('getting data');
|
||||
let lineChartData$ =
|
||||
//<LineData>( {data: [65, 59, 80, 81, 56, 55, 40], label: 'Series A'} );
|
||||
this.http
|
||||
@@ -19,10 +19,7 @@ export class DataService {
|
||||
, {headers: this.getHeaders()})
|
||||
.map(mapData);
|
||||
|
||||
return Observable.create(observer => {
|
||||
observer.next(lineChartData$);
|
||||
observer.complete();
|
||||
});
|
||||
return lineChartData$;
|
||||
|
||||
}
|
||||
|
||||
@@ -34,6 +31,7 @@ export class DataService {
|
||||
}
|
||||
|
||||
function mapData(response:Response): LineData {
|
||||
console.log('mapping data', LineData);
|
||||
return response.json().map(toData)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user