I'm a little confused about how to define views. I know I can create a view directly using:
{{#view "myView"}}
{{/view}}
but I'm also able to assign a view to a template like so:
<script type="text/x-handlebars" data-template-name="template1">
</script>
App.Template1View = Ember.View.extend({
templateName: 'template1'
});
Is there any reason to choose one method over the other?
Thanks!
Aucun commentaire:
Enregistrer un commentaire