Last active
October 23, 2017 19:56
-
-
Save phillipkregg/e7fa4b379fb81f2332777c665fd0a42b to your computer and use it in GitHub Desktop.
Ember Models Table
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
columns: [ | |
{ | |
"propertyName": "id" | |
}, | |
{ | |
"propertyName": "name" | |
}, | |
{ | |
"propertyName": "username" | |
}, | |
{ | |
"propertyName": "email" | |
}, | |
{ | |
"propertyName": "address.street" | |
}, | |
{ | |
"propertyName": "address.suite" | |
}, | |
{ | |
"propertyName": "address.city" | |
}, | |
{ | |
"propertyName": "address.zipcode" | |
}, | |
{ | |
"propertyName": "address.geo.lat" | |
}, | |
{ | |
"propertyName": "address.suite" | |
}, | |
{ | |
"propertyName": "address.geo.lng" | |
}, | |
{ | |
"propertyName": "phone" | |
}, | |
{ | |
"propertyName": "website" | |
}, | |
{ | |
"propertyName": "company.name" | |
}, | |
{ | |
"propertyName": "company.catchPhrase" | |
}, | |
{ | |
"propertyName": "company.bs" | |
}, | |
] | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Route.extend({ | |
model() { | |
var root = 'https://jsonplaceholder.typicode.com'; | |
return $.ajax({ | |
url: root + '/users', | |
method: 'GET' | |
}).then(function(data) { | |
return data; | |
}); | |
}, | |
setupController(controller, model) { | |
// Call _super for default behavior | |
this._super(controller, model); | |
// Implement your custom setup after | |
this.controllerFor('application').set('data', this.get('model')); | |
} | |
}); |
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
body { | |
margin: 12px 16px; | |
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 12pt; | |
} |
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
{ | |
"version": "0.12.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.12.0", | |
"ember-template-compiler": "2.12.0", | |
"ember-testing": "2.12.0", | |
"bootstrap-css": "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css", | |
"bootstrap-js": "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" | |
}, | |
"addons": { | |
"ember-data": "2.12.1", | |
"ember-models-table": "2.0.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment