Skip to content

Instantly share code, notes, and snippets.

@raycohen
Last active March 29, 2019 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save raycohen/91f43204038fe4a42a98e6f212b5413d to your computer and use it in GitHub Desktop.
Save raycohen/91f43204038fe4a42a98e6f212b5413d to your computer and use it in GitHub Desktop.
`@` as property lookup

Overview

Which of the following code samples would you rather someone with no ember experience see first? Keep in mind this could happen in the Ember guides, on stack overflow, or in a codebase.

<div class="blog-post">
<header>
<Avatar class="blog-post__avatar" @user={{@user}} />
<title>{{@title}}</title>
</header>
<p>
{{@body}}
</p>
</div>
<div class="blog-post">
<header>
<Avatar class="blog-post__avatar" @user={{this.args.user}} />
<title>{{this.args.title}}</title>
</header>
<p>
{{this.args.body}}
</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment