AuthenticationService.js 1.34 KB

//angular
//    .module('AIA')
//    .factory('AuthenticationService', function ($resource,$http) {
//        return{
//            authenticateUser: function (userName, Password) {
//                         alert('called service');
//                //return $resource("api/User/:id",
//                //    { id: 1 },
//                //    {
//                //        'Get': {
//                //            method: 'GET',
//                //            url: '/api/User/',
//                //            //params: { id:1, pageNumber: '@pageNumber', orderBy: '@orderBy' }
//                //            params: { id: 1 },
                            
//                //        }
//                //    });
                                       
//            }}});

//angular
//.module('AIA')
//.factory('AuthenticationService', ['$resource', function ($resource) {
//    return $resource('http://localhost/AIA/API/User/:id',
//      { id: '@id' }, {
//          GetUserName: {
//              method: 'GET',
//              params: { id: '@id' },
//              isArray: false,
             
//              }
          
//      });
//}]);

angular
.module('AIA')
.factory('AuthenticationService', ['$resource', function ($resource) {
    return {
        login: function (userName, Password) {
            alert('called service');
        }
    }
}]);