1

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://emberjs.jsbin.com/puqepaqijo/1/

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://emberjs.jsbin.com/puqepaqijo/2/

Toran Billups
  • 27,111
  • 40
  • 155
  • 268

1 Answers1

1

You can:

1) extend Ember.TextField 2) have a layout property instead of a template itself.

Apparently, there was a reason they extended {{input}} instead of making us all do <input {{bind-attr value=value}}> :)

andrusieczko
  • 2,824
  • 12
  • 23
  • that did work but I'm curious if what I showed above is a *bug* or the expected behavior. ie- what would the core team say – Toran Billups Feb 06 '15 at 16:23