socialforge/public/javascripts/wechat/controllers/invite_code.js

19 lines
496 B
JavaScript
Raw Normal View History

2016-07-29 16:13:25 +08:00
/**
* Created by guange on 16/6/22.
*/
app.controller('InviteCodeController', ['$scope','$http', '$routeParams','config','auth', function($scope, $http, $routeParams, config, auth){
var vm = $scope;
vm.course = {};
var courseid = $routeParams.id;
$http.get(config.apiUrl+ 'courses/'+courseid+"?token="+auth.token()).then(
function(response){
console.log(response.data);
vm.course = response.data.data;
}
);
}]);