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
// Our model does some calls to a server or whatever | |
var model = new Ember.RSVP.Promise(function(resolve, reject){ | |
if(someCondition){ | |
resolve(someData); | |
} else { | |
reject(err); | |
} | |
}); |
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
/* Put your CSS here */ | |
html, body { | |
margin: 20px; | |
} |
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
/* Put your CSS here */ | |
html, body { | |
margin: 20px; | |
} |
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
/* Put your CSS here */ | |
html, body { | |
margin: 20px; | |
} |
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
find: function(store, type, id/*, opts*/) { | |
return new Ember.RSVP.Promise(function(resolve, reject) { | |
hoodie.store.find(type.typeKey, id).then(function(data) { | |
Ember.run(null, resolve, data); | |
}, function(data) { | |
Ember.run(null, reject, data); | |
}); | |
} | |
} |
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.Router.map(function() { | |
this.resource('channels', {path: '/'}, function() { | |
this.resource('events', {path: '/:channel_id/events'}); | |
}); | |
}); | |
App.ChannelsRoute = Em.Route.extend({ | |
model: function() { | |
return this.store.find('channels'); | |
} |
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
{ | |
"predef": [ | |
"document", | |
"window", | |
"location", | |
"setTimeout", | |
"Ember", | |
"Em", | |
"DS", | |
"$", |
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
{ | |
"installed_packages": | |
[ | |
"Better JavaScript", | |
"Dust.js", | |
"EditorConfig", | |
"Ember.js Snippets", | |
"Emmet", | |
"GitGutter", | |
"Handlebars", |
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
var attr = DS.attr; | |
var hasMany = DS.hasMany; | |
var belongsTo = DS.belongsTo; | |
var Category = DS.Model.extend({ | |
title: attr(), | |
displayHint: attr(), | |
categoryList: hasMany('category', {inverse: 'parent'}), | |
parent: belongsTo('category', {inverse: 'categoryList'}) | |
}); |
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
<runtime> | |
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | |
<!-- Old asp.net ajax assembly bindings --> | |
<dependentAssembly> | |
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/> | |
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="4.0.0.0"/> | |
</dependentAssembly> | |
<dependentAssembly> | |
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/> | |
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="4.0.0.0"/> |