Skip to content

EmberSherpa/styleguide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

Ember.js Styleguide

This styleguide aims to suggest some style conventions to follow while writing your application.

Note: evaluate each suggestion and consider where it's right fit for you.

JavaScript

Use fat arrow to preserve this

Fat arrow automatically maintains a reference to the context when using this in a closure.

export default Ember.Route.extend({
  afterModel(model) {

    return this.get('ajax').request('verify', model)
      .catch((error) => {
        // this refers to the Route instance
        this.transtionTo('verification-failed', error);
      });
  }
  
});

Object model

About

Ember.js styleguide

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published