parent
8c9723726d
commit
0ed4ee13e7
@ -1,5 +1,9 @@
|
||||
var app = angular.module('SinsApp', []);
|
||||
|
||||
app.controller('HeaderController', function(){
|
||||
this.foo = 'bar'
|
||||
});
|
||||
app.controller('HeaderController', ['$http', function($http){
|
||||
var controller = this;
|
||||
$http.get('/session').success(function(data){
|
||||
controller.current_user = data.current_user;
|
||||
console.log(controller.current_user);
|
||||
})
|
||||
}]);
|
||||
|
||||
Loading…
Reference in new issue