Last active
August 29, 2015 14:10
-
-
Save jmurphyau/a0128880b97375bb2214 to your computer and use it in GitHub Desktop.
This file contains 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({ | |
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