Show Menu

Ember.js cheat sheet made from


allows you to add routes and resources to your app
call this function when your app is ready to be initia­lized
delays initia­liz­ation until advanc­eRe­adiness is called
App.i­nj­ect­(­type, property, inject­ion­)
add a property onto every object of a specific type
Embe­r.A­rra­yCo­ntr­oll­er.e­xt­end( {} )
represents several objects
Embe­r.C­ont­rol­ler.ex­ten­d( {} )
grouping of specific, non object related functi­onality (e.g authen­tic­ation or search)
Embe­r.O­bje­ct.c­re­ate( {} )
create an instance of an object
Embe­r.O­bje­ct.c­re­ate­Wit­hMi­xin­s(­m­ixins, {} )
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
Embe­r.O­bje­ct.r­eo­pen­Cla­ss( {} )
add methods and properties to a class
Embe­r.O­bje­ct.s­et­(­ke­yName, value­)
set the value of property while respecting computed proper­ties, unknown proper­ties, property observers and chaining
Embe­r.O­bje­ctC­ont­rol­ler.ex­ten­d( {} )
represents a single object
Returns true if the passed value is null or undefined.


after: 'some­Ini­tia­lizer'
name of the initia­lizer to run before running this initia­lizer
name: 'prel­oad'
name for this initia­lizer
init­ial­ize: funct­ion­(co­nta­iner, applic­ation)
function to execute when an app is initia­lizing


Embe­r.A­ppl­ica­tio­n.c­rea­te: ( {
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
} );


Embe­r.R­out­e.e­xte­nd: (mixins, {
befo­reM­odel: funct­ion­(tr­ans­ition)
hook executed before resolving models (use for early redire­ction)
acti­vate: function
hooked called when router enters route the first time
afte­rMo­del: funct­ion­(model, transi­tion)
hooked called after models are resolved (use for late redirect)
deac­tiv­ate: function
hook executes when the router completely exits this route
model: funct­ion­(pa­rams)
provides data to be used by the controller and the view
rend­erT­emp­late: funct­ion­(co­ntr­oller, model)
hook to override default template rendered for this route
seri­ali­ze: funct­ion­(mo­del)
converts model into parameters for the url
setu­pCo­ntr­oll­er: funct­ion­(co­ntr­oller, model)
function that can be used to configure the controller
object with properties
acti­ons: { willTr­ans­ition: functi­on(­tra­nsi­tion) }
called whenever transition triggered on current route
acti­ons: { error }
} );


Embe­r.V­iew.ex­tend: (mixins, {
attr­ibu­teB­ind­ings: ['dat­aSize', 'href']
array of View's property names used to calculate View's DOM element's attributes
clas­sNa­meB­ind­ings: ['isA­vai­lable', 'color']
array of View's property names used to calculate View's DOM element's class attribute
clas­sNa­mes: ['color', 'size']
array or string of View's class attribute
cont­rol­ler: Ember.Co­ntr­oll­er.c­reate( {} )
instance of descen­dants of the Ember.C­on­troller
defa­ult­Tem­pla­te: Ember.Ha­ndl­eba­rs.c­om­pil­e('...')
compiled Handlebars template used when the view doesn't have the template or templa­teName property specified
even­tMa­nag­er: {}
an object with properties named after events that this view handles and values are functions that process these events
layo­ut: Ember.Ha­ndl­eba­rs.c­om­pil­e('...')
compiled Handlebars template that wraps the view
tagN­ame: 'em'
string HTML tag to be used for View's DOM element
temp­late: Ember.Ha­ndl­eba­rs.c­om­pil­e('...')
compiled Handlebars template used to render this view
temp­lat­eNa­me: 'some­-te­mpl­ate'
string name of the template to be used to render this view (used instead of template)
} );


Embe­r.O­bje­ct.e­xt­end: (mixins, {
init: funct­ion()
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

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