Skip to content

Instantly share code, notes, and snippets.

@markprovan
Created October 31, 2014 12:13
Show Gist options
  • Save markprovan/a2cb14b4939dbeaa68f7 to your computer and use it in GitHub Desktop.
Save markprovan/a2cb14b4939dbeaa68f7 to your computer and use it in GitHub Desktop.
Context Error
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
login: function() {
var data = {email: this.get("email"), password: this.get("password")}
var _this = this;
$.post( "http://localhost:3000/sessions/create", data, function( response ) {
store = _this.store // _this is undefined
});
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment