Created
February 26, 2014 19:03
-
-
Save mwieher/9236155 to your computer and use it in GitHub Desktop.
EmberJS Issues
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.House = DS.Model.extend({ | |
address = DS.attr('string'); | |
doors = DS.hasMany('door'); | |
}); | |
App.Door = DS.Model.extend({ | |
wood = DS.attr('string'); | |
}); | |
App.Router.map(function () { | |
this.resource('house', {path: '/house/:house_id'}, function() { | |
this.resource('door', {path: '/door/:door_id'}); | |
}); | |
}); | |
App.HouseRoute = Ember.Route.extend({ | |
redirect: function(house, transition) { | |
transitionTo('door', house.doors[0]); | |
} | |
}); |
rwjblue
commented
Feb 26, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment