@samtes wrote:
My node route sends data to the front end
router.post("/key", function (req, res, next) { // do stuff here res.status(201).send({ key: "some_value_i_need_in_ember_app" }); })
My front-end ember
import Ember from 'ember'; export default Ember.Controller.extend({ actions: { generateKey () { var credentials = this.getProperties("difficulty", "quantity"); this.store.createRecord("key", credentials).save().then(record => { console.log("success", record); }, reason => { console.log("error", reason); }); } } });
However, record doesn't give me the "key" the backend sends. How do I access that data????
Posts: 1
Participants: 1