/** * 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; } ); }]);