AuthenticationController.js 1.09 KB


               'use strict';
               AIA.controller("AuthenticationController", ["$scope", "AuthenticationService",
                function ($scope, AuthenticationService) {
                                       
                  

                    $scope.login = function () {


                        alert('called controller');

                        //$scope.user = AuthenticationService.GetUserName({ id: 42 });
                        //$scope.user.$promise.then(function (data) {
                        //    $scope.user = data;

                        //    debugger;
                        //    alert('called webAPI' + $scope.user);
                        //});

                        $scope.user = AuthenticationService.login();
                        //$scope.user.$promise.then(function (data) {
                        //    $scope.user = data;

                        //    debugger;
                        //    alert('called webAPI' + $scope.user);
                        //});
                    }

                }])