Reputation: 7932
In a Meteor template with Blaze I want to simply duplicate a piece of text entered by the user onto another part of the screen. Is there a way to do this without writing helper JS code? Something like:
<input value="{{theValue}}" type="text">
<p>{{theValue}}</p>
I don't want to store the data in a collection, just duplicate it. Seems like this can't be done without writing a JS helper.
Upvotes: 0
Views: 213
Reputation: 283
Like you said,i am unaware of any method too without writing a helper for this, if you are taking the user's input and then you want to display it elsewhere,it would be best to store the input in a Session or reactive variable and then later display it with a helper
in the input event
Session.set("inputValue",the-user's value);
and return a helper wherever you want to display it
'userValue' : function(){
return Session.get("inputValue");
anyway i would update the answer if i find something that can be done without using a helper
Upvotes: 1