-<script>
-var app=angular.module("abs", []);
-app.controller("externalLoginController", function ($scope) {
- // Table Data
-
- $scope.viewPerPage = 200;
- $scope.currentPage = 2;
- $scope.totalPage;
- $scope.searchCategory = "";
- $scope.searchString = "";
- $scope.loginId="";
- $scope.password="";
- $scope.loginError=true;
- $scope.viewPerPage = 200;
- $scope.currentPage = 2;
- $scope.totalPage;
- $scope.searchCategory = "";
- $scope.searchString = "";
- $scope.loginId="";
- $scope.password="";
- $scope.loginUrl = "";
-
- $scope.loginExternal = function() {
- var postData={loginId:$scope.loginId,password:$scope.password};
- $.ajax({
- url: "open_source/login?",
- type : "POST",
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success:function (response){
- if(response.success=="success"){
- //window.location.href = 'applicationsHome';
- window.location.href= "<%=frontUrl%>",
- sessionStorage.setItem('userId',$scope.loginId)
- }else{
- $("#errorInfo span").text(response);
- //$("#errorInfo").text = response;
- $("#errorInfo").show();
- }
- },
- error:function( jqXHR, status,error ){
- $("#errorInfo").show();
- }
-
- });
-
- };
-});
-</script>