ember.js - Input helper valueBinding is deprecated - what's the alternative? -
i've got few text-input helper this
{{input type="text" valuebinding="name" focus-out="focusoutname"}}
i upgraded ember 1.11.0 , deprecation warning:
deprecation: you're attempting render view passing valuebinding view helper, syntax deprecated. should use
value=somevalue
instead.
however when using value not bound in controller , value
sets text whatever value.
how correctly bind it?
you should have change:
{{input type="text" valuebinding="name" focus-out="focusoutname"}}
to:
{{input type="text" value=name focus-out="focusoutname"}}
or better (don't need type="text", it's automatic):
{{input value=model.name focus-out="focusoutname"}}
then next can display value, , see change when change input (so can test bindings set already):
{{input value=model.name focus-out="focusoutname"}} {{model.name}}
Comments
Post a Comment