"use strict";
webapimodule.service('apiService', function ($q, $http) {
    
    //Login Validation Function Call
    this.loginValidation = function (UserModel) {
        var promise = $q.defer();
        $http({
            method: 'POST',
            url: 'webapi/ValidateLogin',
            data: UserModel,
        }).then(function successCallback(response) {
            // this callback will be called asynchronously
            // when the response is available
            promise.resolve(response.data);

        }, function errorCallback(response) {
            // called asynchronously if an error occurs
            // or server returns response with an error status.
            promise.resolve(response);
        });
        return promise.promise;
    }
});

