Hi, I'm trying to use a global variable to pass a value to a referred service/application.
<head>
<meta charset="utf-8">
<title>My Web</title>
<script type="text/javascript" src="http://XXX_Host.com/XXX.js"></script>
<script>
var GlobalVariable = "DefaultValue";
</script>
</head>
<body ng-app="MyApp" >
<div class="ngview" ng-view=""></div>
<script src="./dist/app.min.js"></script>
</body>
</html>
From my angular module I fire a CustomEvent which tells XXX to read window.GlobalVariable and display it's value. Before I fire this event I put GlobalVariable to a proper value but the XXX only "sees" and displays the initial default value.
Is there a way to do this this way ?
I've tried to use window.GlobalVariabæ3 = ""New value" as well as the Angular service stuff.
Kind regards,
Bjarni