Show Menu

Ember.js Cheat Sheet by [deleted]

Ember.js cheat sheet made from


allows you to add routes and resources to your app­van­ceR­ead­iness()
call this function when your app is ready to be initia­lized­fer­Rea­din­ess()
delays initia­liz­ation until advanc­eRe­adiness is called­ject(type, property, injection)
add a property onto every object of a specific type
Ember.A­rr­ayC­ont­rol­ler.ex­tend( {} )
represents several objects
Ember.C­on­tro­lle­r.e­xtend( {} )
grouping of specific, non object related functi­onality (e.g authen­tic­ation or search)
Ember.O­bj­­eate( {} )
create an instance of an object
Ember.O­bj­­eat­eWi­thM­ixins(mixins, {} )
create an instance of an object with mixins
set isDest­roying to true and schedule removal of all bindings and observing for the end of run loop
return value of property by given name while respecting computed and observed properties
Ember.O­bj­­ope­nClass( {} )
add methods and properties to a class
Ember.O­bj­ect.set(keyName, value)
set the value of property while respecting computed proper­ties, unknown proper­ties, property observers and chaining
Ember.O­bj­ect­Con­tro­lle­r.e­xtend( {} )
represents a single object
Returns true if the passed value is null or undefined.


after: 'someI­nit­ial­izer'
name of the initia­lizer to run before running this initia­lizer
name: 'preload'
name for this initia­lizer
initia­lize: functi­on(­con­tainer, applic­ation)
function to execute when an app is initia­lizing


Ember.A­pp­lic­ati­on.c­reate: ( {
creates an instance that will be your app and your app's namespace
activate logging of automa­tically generated routes and contro­llers
activate logging of deprecated method or property usage
activate basic logging of successful transi­tions
activate detailed logging of all routing steps
activate logging of results of view and template searches by routes
DOM element or jQuery­-co­mpa­tible selector string where your app will be rendered
} );


Ember.R­ou­te.e­xtend: (mixins, {
before­Model: functi­on(­tra­nsi­tion)
hook executed before resolving models (use for early redire­ction)
activate: function
hooked called when router enters route the first time
afterM­odel: functi­on(­model, transi­tion)
hooked called after models are resolved (use for late redirect)
deacti­vate: function
hook executes when the router completely exits this route
model: functi­on(­params)
provides data to be used by the controller and the view
render­Tem­plate: functi­on(­con­tro­ller, model)
hook to override default template rendered for this route
serialize: functi­on(­model)
converts model into parameters for the url
setupC­ont­roller: functi­on(­con­tro­ller, model)
function that can be used to configure the controller
object with properties
actions: { willTr­ans­ition: functi­on(­tra­nsi­tion) }
called whenever transition triggered on current route
actions: { error }
} );


Ember.V­ie­w.e­xtend: (mixins, {
attrib­ute­Bin­dings: ['data­Size', 'href']
array of View's property names used to calculate View's DOM element's attributes
classN­ame­Bin­dings: ['isAv­ail­able', 'color']
array of View's property names used to calculate View's DOM element's class attribute
classN­ames: ['color', 'size']
array or string of View's class attribute
contro­ller: Ember.C­on­tro­lle­r.c­reate( {} )
instance of descen­dants of the Ember.C­on­troller
defaul­tTe­mplate: Ember.H­an­dle­bar­s.c­omp­ile­('...')
compiled Handlebars template used when the view doesn't have the template or templa­teName property specified
eventM­anager: {}
an object with properties named after events that this view handles and values are functions that process these events
layout: Ember.H­an­dle­bar­s.c­omp­ile­('...')
compiled Handlebars template that wraps the view
tagName: 'em'
string HTML tag to be used for View's DOM element
template: Ember.H­an­dle­bar­s.c­omp­ile­('...')
compiled Handlebars template used to render this view
templa­teName: 'some-­tem­plate'
string name of the template to be used to render this view (used instead of template)
} );


Ember.O­bj­ect.ex­tend: (mixins, {
init: function()
method called when an instance of this class is created
} );

Courtesy of



thanks for your kindness of sharing this sheet (y)

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Selenium WebDriver Cheat Sheet Cheat Sheet
          Cypressio Cheat Sheet
          ISTQB Test Automation Engineering Cheat Sheet