Last active
March 9, 2017 12:32
-
-
Save feanor07/f0a97284b32994d71d12ab189ab1d9b8 to your computer and use it in GitHub Desktop.
Stackoverflow Question 42680122
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' | |
}); |
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 function fieldExtractor(params/*, hash*/) { | |
let object = params[0]; | |
let result = []; | |
for (const key in object) { | |
if (object.hasOwnProperty(key)) { | |
result.push(key); | |
} | |
} | |
return result; | |
} | |
export default Ember.Helper.helper(fieldExtractor); |
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'; | |
var data = { | |
"employee": [{ | |
"id": "1001", | |
"name": "Employee1", | |
"address": { | |
"Street": "25 West Street", | |
"city": "City1", | |
"state": "State1", | |
"Country": "US" | |
} | |
}] | |
}; | |
export default Ember.Route.extend({ | |
model() { | |
return 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
{ | |
"version": "0.11.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.11.0", | |
"ember-data": "2.11.0", | |
"ember-template-compiler": "2.11.0", | |
"ember-testing": "2.11.0" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment