Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ember.js

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers.

 Ember.js

test presentation

Avatar for xamenrax

xamenrax

April 04, 2013
Tweet

Other Decks in Programming

Transcript

  1. App.Cat = Ember.Object.extend({ name: 'null', meow: function(thing) { alert(thing); }

    }); App.Cat = DS.Model.extend({ name: DS.attr('string'), isSelected: DS.attr('boolean', {defaultValue: false}) }); App.Store = DS.Store.extend({ revision: 12 });
  2. App.Router.map(function() { this.resource('cats', function() { this.recourse('cat', { path: ':cat_id' };

    }); }); App.CatsRoute = Ember.Route.extend({ model: function() { return App.Cat.find(); } }); App.CatRoute = Ember.Route.extend({ model: function(params) { return App.Cat.find(params.cat_id); } });