Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve explanation of passing actions (#162) #177

Merged
merged 3 commits into from
Oct 4, 2018

Conversation

Parrryy
Copy link
Contributor

@Parrryy Parrryy commented Oct 1, 2018

First draft for #162

Copy link
Contributor

@jayjayjpg jayjayjpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This update seems great to me! I just left one formatting comment, but otherwise this seems already good to go to me ✨

```handlebars {data-filename=app/templates/index.hbs}
{{button-with-confirmation
text="Click here to unsubscribe."
onConfirm=(action 'unsubscribe')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to update the quotes here in the action helper, too, to also use the double quoted version as the other string expression in the template examples:

(action "unsubscribe")

@Parrryy
Copy link
Contributor Author

Parrryy commented Oct 3, 2018

I've updated the formatting of the quotes as instructed ☕️ 😄

```

It is important to note that actions can only be passed from a controller or another
component. They cannot be passed from a route. See [passing an action to the component](/triggering-changes-with-actions/#toc_passing-the-action-to-the-component)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just had another look locally and this already looks great! One more thing I noticed is, that the link here doesn't point to the correct page, yet:

linktoactions

Can you check what is missing for the link? I assume there are other relative links in the guides source which you can use as a reference, too.

@Parrryy Parrryy force-pushed the teach-passing-actions branch 2 times, most recently from 1347823 to f795ef1 Compare October 4, 2018 08:58
@Parrryy Parrryy force-pushed the teach-passing-actions branch from f795ef1 to 2d9147f Compare October 4, 2018 09:00
Copy link
Contributor

@jayjayjpg jayjayjpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works great locally, thank you for this update @Parrryy

@jayjayjpg jayjayjpg merged commit a2b8c6c into ember-learn:master Oct 4, 2018
@Parrryy Parrryy deleted the teach-passing-actions branch October 4, 2018 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants