Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4828

Need clarification over some syntax

$
0
0

@bmurphy wrote:

Hi there,

Been using the latest version of Ember and getting used to all the new syntax and features. Great stuff!

I just need someone to help me clarify a few things as I’m trying to learn from a combination of the current docs and the new, upcoming docs under the Octane edition of ember.

  1. What’s the correct (preferred?) way to reference attributes not passed in from a parent component or controller? I started out doing {{this.value}} which works but so does {{value}}. I’m guessing the this is implied and maybe it’s just good practice to do {{this.value}}?

  2. Trying to get my head wrapped around passing actions around. It appears that I can do @onChange={{action myAction}} or @onChange={{fn myAction}} or @onChange={{action "myAction}} etc. Guess my question is when do I need action vs fn?

Appreciate it!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4828

Trending Articles