Access {{ENV} }enviroment in index.html


#1

At Index.html I would like to use window.appEnv = {{ENV}}

with config/environment.js, ENV have been defined already.

I built and served the ember and got Uncaught SyntaxError: Unexpected token {

What wrong with my index.html


#2

Using {{varname}} is HTMLBars syntax but index.html isn’t an HTMLBars (.hbs) file so you can only use normal HTML inside. Can you describe what you’re trying to accomplish with appEnv and maybe we can recommend something? You can import your environment config in any of your app javascript as shown here in the guides.