As fs seems not to work anymore since Angular 6
I haven't found an alternative way to check if a file exists.
In my special case I have to check if a specific image file exists in the assets folder, e.g. something like this:
if (fileExists('path')) { doSomething(); }
I've tried to install the file-exists package but this uses
const fs = require('fs')
const path = require('path')
which apparently is not supported by Angular 7.
Is there anybody who can help? Thanks a lot.