Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ngAfterViewInit() {
if (OSDetectorService.getDeviceOS() === DeviceOS.Android) {
const inputEvent = fromEvent(this.tagsInput.nativeElement, 'input');
inputEvent.pipe(map(event => event));
this.inputEventSubscription = inputEvent.subscribe(($event: any) => {
if ($event.data === ' ') {
this.onUserInput({ keyCode: 32 });
}
});
}
}