Consider the following Angular code:
The output might surprise you.
This means we can’t simply access global variables or variables on window in these expressions. There might be scenarios where you want to do exactly that - for example, feature flags are often rendered server-side and attached directly to
window (or rendered as global variables).
In order to access these inside template expressions you need to assign them to the scope.
You can find all the code on Plunker. Happy coding.