Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function AppComponent(deviceService) {
this.deviceService = deviceService;
this.propsToShow = ["userAgent", "os", "browser", "device", "os_version", "browser_version"];
this.device = null;
this.device = deviceService.getDeviceInfo();
console.log(this.device);
console.log('isMobile', this.deviceService.isMobile());
console.log('isTablet', this.deviceService.isTablet());
}
var _a;
AppComponent = __decorate([
core_2.Component({
selector: 'app',
template: "\n <div class="\"container\"" id="\"demoApp\"">\n <div class="\"demo-container\"">\n <div class="\"demo-heading\"">\n <h2 class="\"text-center">\n ngx-device-detector demo\n </h2>\n <p class="\"text-center\"">\n Open this page from different devices to see the appropriate details\n </p>\n <h4 class="\"text-center\"">Device Information</h4>\n </div>\n <div class="\"information-table\"">\n \n \n \n \n \n \n \n \n \n <table class="\"table"><tbody><tr><th>Property</th><th>Value</th></tr><tr class="\"info-item"><td>{{info.key}}</td><td>{{info.value}}</td></tr></tbody></table>\n </div>\n </div>\n </div>\n"
}),
__metadata("design:paramtypes", [typeof (_a = typeof ngx_device_detector_1.DeviceDetectorService !== "undefined" && ngx_device_detector_1.DeviceDetectorService) === "function" ? _a : Object])
], AppComponent);
return AppComponent;
}());
var AppModule = /** @class */ (function () {