Emberjs custom config variables
问题 How would one specify a custom config variable for use in the handlebars template? For example: // config/settings.json { "title": "Hello World" } // config/foo.json { "bar": "baz" } // Template {{ settings.title }} {{ foo.bar }} 回答1: You need to use dependency injection to inject you global variables into the controller. This blog post from Balint Erdi explains it well. Here is a working demo. This is basically what you do Create 2 object - settings and foo. var settings = Ember.Object