Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $scope.LogIn = function () {
- $http({
- url: "http://www.ccuktech.co.uk/ccuploader/users/login",
- method: "POST",
- data: $.param({'username': $scope.UserName, 'password': $scope.PassWord}),
- headers: {'Content-Type': 'application/x-www-form-urlencoded'}
- }).then(function (response) {
- // success
- console.log('success');
- console.log("then : " + JSON.stringify(response));
- GetData();
- // location.href = '/cms/index.html';
- }, function (response) { // optional
- // failed
- console.log('failed');
- console.log(JSON.stringify(response));
- });
- };
- $scope.UserData = function ($scope) {
- $scope.UserName = "";
- $scope.PassWord = "";
- };
- $scope.GetData = function () {
- $http({
- url: " http://www.ccuktech.co.uk/ccuploader/campaigns/getCampaign",
- method: "POST",
- headers: {'Content-Type': 'application/x-www-form-urlencoded'}
- }).then(function (response) {
- // success
- console.log('you have received the data ');
- console.log("then : " + JSON.stringify(response));
- location.href = '/cms/index.html';
- }, function (response) { // optional
- // failed
- console.log('failed');
- console.log(JSON.stringify(response));
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement