I'm testing the main features of Ember.js. According to the provided Guide, the following code, using simply Bindings and Auto-Updating templates should output Hey there! This is My Ember.js Test Application!
but instead it outputs Hey there! This is !
.
JS:
// Create the application.
var Application = Ember.Application.create();
// Define the application constants.
Application.Constants = Ember.Object.extend({
name: 'My Ember.js Test Application'
});
// Create the application controller.
Application.ApplicationController = Ember.Controller.extend();
// Create the application view.
Application.ApplicationView = Ember.View.extend({
templateName: 'application',
nameBinding: 'Application.Constants.name'
});
// Create the router.
Application.Router = Ember.Router.extend({
root: Ember.Route.extend({
index: Ember.Route.extend({
route: '/'
})
})
})
// Initialize the application.
Application.initialize();
HBS:
<script type="text/x-handlebars" data-template-name="application">
<h1>Hey there! This is <b>{{name}}</b>!</h1>
</script>
Is there something I am doing wrong?