UNPKG

harbor-angular

Version:

Harbor shared components based on Clarity and Angular2s

38 lines 1.41 kB
import { Component } from '@angular/core'; import { SystemInfoService } from './providers/system-info.service'; export var SystemComponent = (function () { function SystemComponent(systemService) { this.systemService = systemService; this._systemInfo = "Loading..."; } Object.defineProperty(SystemComponent.prototype, "info", { get: function () { return this._systemInfo; }, enumerable: true, configurable: true }); SystemComponent.prototype.ngOnInit = function () { this.getInfo(); }; SystemComponent.prototype.getInfo = function () { var _this = this; this.systemService.getSystemInfo() .then(function (res) { return _this._systemInfo = JSON.stringify(res); }) .catch(function (error) { return console.error("Retrieve system info error: ", error); }); }; SystemComponent.decorators = [ { type: Component, args: [{ selector: 'hbr-system', template: "\n <pre>\n {{info}}\n </pre>\n ", styles: [], providers: [SystemInfoService] },] }, ]; /** @nocollapse */ SystemComponent.ctorParameters = function () { return [ { type: SystemInfoService, }, ]; }; return SystemComponent; }()); //# sourceMappingURL=system.component.js.map