I am having some issues getting Ember.js to pick up and render a handlebars template file. I get the following error in my browser's debug console:
Error: <(subclass of Welcome.LoginView):ember166> - Unable to find template "login_view".
I have the following code in emberjs code in my app.js file:
Welcome = Ember.Application.create();
Welcome.LoginView = Ember.View.extend({
templateName: 'login_view'
});
I also have the following snippet in my index.html file:
<script type="text/x-handlebars">
{{view Welcome.LoginView}}
</script>
Finally, relative to the app.js file I have the file templates/login_view.handlebars, which contains the template contents to render:
<form class="form-inline">
<fieldset>
<input type="text" name="email" placeholder="email address">
<input type="password" name="password" placeholder="password">
<button class="btn btn-primary" type="submit">Sign In</button>
<!-- ... -->
</fieldset>
</form>
The error seems to indicate that it can't locate the handlebars template. When I look at the generated HTML I don't see the above form on the page.
Can anyone shed some light on what I am doing wrong?