mardi 16 juin 2015

EmberJS Handle Bars Inputs

I have the following:

         <span>{{m.search_type}}</span>
          {{input value=m.search_type}}

I retrieve the search_type with

this.get(search_type) in the controller that handles the form submission.

However, when I change the input value, the value within the <span>..</span> will change. This is the defined behavior in the docs.

I want the span to be the title for the input field and to not change along with the value of search_type. Search type is dynamic so I can't just hardcode the value for {{m.search_type}}.

Is there a way to do this? I tried creating a EmberJS Helper to map the value to a new string but this still changes whenever search_type changes.




Aucun commentaire:

Enregistrer un commentaire