I am using below code just to see devices connected on usb port. Getting error "Property usb does not exist on type Navigator" at compile time when I run 'ng serve' command in command prompt.
ngOnInit() {
async () => {
let devices = await navigator.usb.getDevices();
devices.forEach(device => {
// Add |device| to the UI.
console.log(device);
});
}
}