Ember passing arguments to action using {{input}} helper.
up vote
0
down vote
favorite
Let's take this case
{{input value=firstName key-press="updateFirstName"}}
In this case, value will be passed as an argument to the action "UpdateFirstName".
Now i want to pass an object "Person" also to the action. How do i do it?
I've tried
{{input value=firstName key-press="updateFirstName Person"}}
but no use. Can someone help?
html ember.js ember-data
add a comment |
up vote
0
down vote
favorite
Let's take this case
{{input value=firstName key-press="updateFirstName"}}
In this case, value will be passed as an argument to the action "UpdateFirstName".
Now i want to pass an object "Person" also to the action. How do i do it?
I've tried
{{input value=firstName key-press="updateFirstName Person"}}
but no use. Can someone help?
html ember.js ember-data
1
Something likekey-press=(action (action 'updateFirstName' person))
and person will be in first argument
– Gennady Dogaev
2 days ago
Worked! Thanks a lot, man.
– Anonymous2018
2 days ago
Hey, I'm using <input type="text" value={{person.name}} onkeypress={{action 'functionName' person value}}>.. But value is not getting passed..
– Anonymous2018
yesterday
<input type="text" value={{person.name}} onkeypress={{action (action 'functionName' person) value="target.value"}}>
– Gennady Dogaev
yesterday
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Let's take this case
{{input value=firstName key-press="updateFirstName"}}
In this case, value will be passed as an argument to the action "UpdateFirstName".
Now i want to pass an object "Person" also to the action. How do i do it?
I've tried
{{input value=firstName key-press="updateFirstName Person"}}
but no use. Can someone help?
html ember.js ember-data
Let's take this case
{{input value=firstName key-press="updateFirstName"}}
In this case, value will be passed as an argument to the action "UpdateFirstName".
Now i want to pass an object "Person" also to the action. How do i do it?
I've tried
{{input value=firstName key-press="updateFirstName Person"}}
but no use. Can someone help?
html ember.js ember-data
html ember.js ember-data
asked 2 days ago
Anonymous2018
287
287
1
Something likekey-press=(action (action 'updateFirstName' person))
and person will be in first argument
– Gennady Dogaev
2 days ago
Worked! Thanks a lot, man.
– Anonymous2018
2 days ago
Hey, I'm using <input type="text" value={{person.name}} onkeypress={{action 'functionName' person value}}>.. But value is not getting passed..
– Anonymous2018
yesterday
<input type="text" value={{person.name}} onkeypress={{action (action 'functionName' person) value="target.value"}}>
– Gennady Dogaev
yesterday
add a comment |
1
Something likekey-press=(action (action 'updateFirstName' person))
and person will be in first argument
– Gennady Dogaev
2 days ago
Worked! Thanks a lot, man.
– Anonymous2018
2 days ago
Hey, I'm using <input type="text" value={{person.name}} onkeypress={{action 'functionName' person value}}>.. But value is not getting passed..
– Anonymous2018
yesterday
<input type="text" value={{person.name}} onkeypress={{action (action 'functionName' person) value="target.value"}}>
– Gennady Dogaev
yesterday
1
1
Something like
key-press=(action (action 'updateFirstName' person))
and person will be in first argument– Gennady Dogaev
2 days ago
Something like
key-press=(action (action 'updateFirstName' person))
and person will be in first argument– Gennady Dogaev
2 days ago
Worked! Thanks a lot, man.
– Anonymous2018
2 days ago
Worked! Thanks a lot, man.
– Anonymous2018
2 days ago
Hey, I'm using <input type="text" value={{person.name}} onkeypress={{action 'functionName' person value}}>.. But value is not getting passed..
– Anonymous2018
yesterday
Hey, I'm using <input type="text" value={{person.name}} onkeypress={{action 'functionName' person value}}>.. But value is not getting passed..
– Anonymous2018
yesterday
<input type="text" value={{person.name}} onkeypress={{action (action 'functionName' person) value="target.value"}}>
– Gennady Dogaev
yesterday
<input type="text" value={{person.name}} onkeypress={{action (action 'functionName' person) value="target.value"}}>
– Gennady Dogaev
yesterday
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53343637%2fember-passing-arguments-to-action-using-input-helper%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Something like
key-press=(action (action 'updateFirstName' person))
and person will be in first argument– Gennady Dogaev
2 days ago
Worked! Thanks a lot, man.
– Anonymous2018
2 days ago
Hey, I'm using <input type="text" value={{person.name}} onkeypress={{action 'functionName' person value}}>.. But value is not getting passed..
– Anonymous2018
yesterday
<input type="text" value={{person.name}} onkeypress={{action (action 'functionName' person) value="target.value"}}>
– Gennady Dogaev
yesterday