Skip to content

Instantly share code, notes, and snippets.

@jmurphyau
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmurphyau/a0128880b97375bb2214 to your computer and use it in GitHub Desktop.
Save jmurphyau/a0128880b97375bb2214 to your computer and use it in GitHub Desktop.
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
login: function(a,b,c,d) {
var me = this, data = this.getProperties('username','password');
Ember.$.post('/admin/login',data).then(function(response) {
me.session.set('token',response.substring(0,50));
console.log("token inside controller.login",me.session.get('token'));
});
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment