In index.html
<script>
var variable='some value';
</script>
How can I access variable in angular code? I tried windows.variable, which come with compiling error. I've seen $window.variable on angular 2. But I can't find any usage of $window in angular 4. Is there any solution to get access to pre-defined variable in html code with angular 4?