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

Function declaration naming conventions

$
0
0

@shaunb wrote:

I'm curious about these two ways of declaring functions in ember:

export default Ember.Component.extend({
    didInsertElement() {
		...
    },
    didInsertElement: function() {
    	...
    }
});

Both seem to work just fine. I've seen both in different areas of the documentation (most examples use the second form, but 'services' for example uses the first form. Is there a difference? Should I pick one and go with it? Any implications I should know about?

Thanks for you help, Shaun

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4829

Trending Articles