daily pastebin goal
1%
SHARE
TWEET

Untitled

a guest Feb 4th, 2016 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var authApp = angular.module('AuthApp', ['ui.bootstrap']);
  2. authApp.controller('AuthController',
  3.  ['$scope', '$uibModal',
  4.  function ($scope, $uibModal) {
  5.      //$scope.credentials = {
  6.      //    userName: "",
  7.      //    uPassword: "",
  8.      //    rememberMe: ""
  9.      //};
  10.      $scope.OpenLoginModal = function (templateUrl) {
  11.          var modalInstance = $uibModal.open({
  12.              animation: false,
  13.              backdrop: 'static',
  14.              templateUrl: templateUrl,
  15.              controller: 'loginModalController'//,
  16.              //resolve: {
  17.              //    credentials: function () {
  18.              //        return $scope.credentials;
  19.              //    }
  20.              //}
  21.          });
  22.      };
  23.  }]);
  24.  
  25. authApp.controller('loginModalController',
  26.  ['$scope', '$modalInstance', 'AuthService',
  27.  function ($scope, $modalInstance, AuthService) {
  28.      //$scope.credentials = credentials;
  29.      //$scope.headerTitle = 'Login Information';
  30.  
  31.      $scope.LoginUser = function () {
  32.          //var data = {};
  33.          //console.log($scope.credentials);
  34.          AuthService.ValidateServerAccessDetails(data).then(function (response) {
  35.              //$modalInstance.close(response.data);
  36.          }, function (response) {
  37.              //$scope.userName = "";
  38.              //$scope.passWord = "";
  39.          });
  40.      };
  41.  
  42.      $scope.CancelLogin = function () {
  43.          $modalInstance.dismiss('cancel');
  44.      };
  45.  }]);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top