This file contains 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
thing: { | |
'first-name': 'Aaron', | |
'hello_last-name': '', | |
'status': '', | |
}, | |
This file contains 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
thing: { | |
'first-name': '', | |
'last-name': '', | |
'status': '', | |
}, | |
actions: { |
This file contains 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
people: Ember.computed.or('model.{current,previous}.value'), | |
isLoading: Ember.computed.reads('model.current.isRunning'), | |
fetchError: Ember.computed.reads('model.current.error'), | |
actions: { | |
fetchMore() { | |
this.send('refreshModel'); |
This file contains 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
db: Ember.computed('refreshDb', function() { | |
let dump = window.server.schema.db.dump(); | |
return JSON.stringify(dump, null, 2); | |
}), |
This file contains 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
}); |
This file contains 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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
db: Ember.computed('refreshDb', function() { | |
let dump = window.server.schema.db.dump(); | |
return JSON.stringify(dump, null, 2); | |
}), |
This file contains 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
import DS from 'ember-data'; | |
import UrlTemplates from 'ember-data-url-templates'; | |
export default DS.JSONAPIAdapter.extend(UrlTemplates, { | |
host: '', | |
namespace: 'api', | |
urlTemplate: '{+host}/{+namespace}/{pathForType}{/id}', | |
}); |
This file contains 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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: 'ul', | |
display: Ember.computed('data.[]', function() { | |
return this.get('data').slice(-1)[0]; | |
}), | |
nested: Ember.computed('data.[]', function() { | |
return this.get('data').slice(0, -1); | |
}), |
This file contains 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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
tagName: 'ul', | |
display: Ember.computed('data', function() { | |
return this.get('data').pop(); | |
}), | |
nested: Ember.computed('data', function() { | |
return this.get('data').slice(0, -1); | |
}), |
This file contains 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
import Adapter from "ember-data/adapters/json-api"; | |
export default Adapter.extend(); |
NewerOlder