I am coding a page where after the user has entered the data in input fields, the data will be validated with an ajax request. After the data has been validated the page must be redirected to another page.
The below code is not working :
                $scope.validateUser = function() {
                    username = $scope.username;
                    password = $scope.password;
                    if ( username === "nrvarun89") {
                        console.log(username+" "+password+" path is :"+window.location.href);
                        window.location.href = "http://localhost/b2c-webadmin/index/";
                        console.log(username+" "+password+" new path is :"+window.location);
                    }
                };
    
$scope.validateUsercoming from? where is$scope.usernameand$scope.passwordbeing set? why are you taking in a parameter and then overwriting it's value as the first statement in the function? does theifblock ever actually execute?