I am currently developing a web application where I need to redirect from the login page to the welcome page once the user id and password have been validated.
<script>
var app = angular.module('myApp', []);
app.controller('customersCtrl', function ($scope, $http, $interval) {
//login
$scope.loginbutton = function () {
$http.get('/login.asmx/loginuser', {
params: {
log: $scope.log,
pm: $scope.pm,
password: $scope.password
}
})
.then(function (response) {
{
//Need code here to redirect to another page
}
})
}
});
</script>
This script showcases my use of AngularJS. How can I successfully redirect to another page using this script?