vendredi 6 février 2015

Can I two way bind a model property in ember without a template for the component?

I have a simple ember component



import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'input',
type: 'text',
attributeBindings: ['value', 'type']
});


I'm trying to "not" require a template (on purpose) ... but when I remove the template it no longer binds back to the controller (here was the template I had)



{{input value=value}}


... it doesn't update the model/or controller (simple controller below)



import Ember from 'ember';
export default Ember.Controller.extend({
number: ''
});


Here is the working jsbin to show the issue


http://ift.tt/1DHC0nf


note: if you add the template it works ... but I'd like to build this/bind this without having to require my own template ships with the ember-cli addon


http://ift.tt/1DHBXYJ





Aucun commentaire:

Enregistrer un commentaire