I have a global js variable defined below (@Url is an ASP.Net MVC html helper it will get converted to a string value):
In HTML template you can use method get
{{getGlobalData('rootVar')}}
And create method in component like:
get getGlobalData() { // Closure workaround return function(rootVarName) { return window[rootVarName]; } }