I need to define a variable in my index.html file and use it in my angular4/typescript code and I get a compile error.
my compile error is:
Error:(109, 27) TS2339: Property 'standalone' does not exist on type 'Window'.
the variable definition in HTML is: var standalone = 'true';
System.import('app').catch(function (err) {
console.error(err);
});
</script>
the typescript code is:
if(window.standalone !== undefined) {
console.log('standalone');
}
Anyone sees what I am doing wrong?
if((window as any).standalone !== undefined) { console.log('standalone'); }