Hi Reza,

Using a global, especially with a generic name like that is usually not a 
good idea. Aside from that, if you use array notation, TypeScript will 
happily accept whatever you want.

const standAlone: boolean = window['standAlone'] || false;

That will do the trick, and pull in the global and cast it correctly into a 
boolean at any place you need.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to