Questions tagged redirect

Explore the latest questions and answers asked by our top developers.

How to redirect to another page in angularJS 1.7.2?

I couldn’t quite find what I needed in other questions,and this code is quite old. I have the following: var app = angular.module(‘pageForm’, []); app.controller(‘pageFormController’, function($scope, $http, $timeout) { *stuff* … function success(response) { $scope.formOk = true; $scope.setMsg(; $scope.formMsg =; $scope.error =; } function error (response) {*stuff*} $‘includes/ajax/form.jsp’,data) .then(success, failure); }) I’d like […]

By Adehmar
Categorized as angularjs, redirect Tagged ,

Angular 7 – ngOnInit – window.location.href not working – From HTTPS to HTTP

I have following piece of code in my ngOnInit event. ngOnInit() { let Url = window.location.href.trim().toLocaleLowerCase(); if (Url.startsWith("https://")) { console.log(‘HTTPS’); let NewUrl = Url.replace("https://", "http://"); this.document.location.href = NewUrl; } } My aim is that if Url is having HTTPS then I need to redirect to same Url but with HTTP. But this piece of code […]

By Gulfam
Categorized as angular, ngoninit, redirect, window.location Tagged , , ,

How can we redirect to required angular page (routing page) from spring boot controller – angular integrated inside spring boot

I have integrated angular application inside spring boot application.. i.e. angular build files are placed inside static folder of spring boot application like following image. I have defined two angular routing urls like 1. http://localhost:8080/pageone 2. http://localhost:8080/pagetwo when I access above urls from browser, which are handled by server (spring boot application) directly and not […]

How to redirect a user to an external site though a POST request

How to redirect a user to an external site though a POST request,which is better using core web api or frontend- angular? I am working with a payment gateway. For confirming 3D secure I need to redirect the user to a new-url. The docs says that use like this a form, <form id="pa-form" method="post" […]

Auto-redirect connection to port 4201 and fail (WSL2)

I am creating a website with Angular on WSL2 Ubuntu running on a Windows 10 computer. When I launch the application with the ng serve command, I get ** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ ** and ✔ Compiled successfully. on the command line. But when I click […]

By novicious
Categorized as angular, localhost, redirect, wsl-2 Tagged , , ,

Angular kendo-editor links to wrong address

When I create a link in the editor it will appear like this: However when I click on it it will bring me to https://mysite/ I’m using "@progress/kendo-angular-editor": "^0.9.0" in my aspnetzero application This is what chrome editor shows: Source: Angular Questions

Angular routing redirectTo displays wrong component

I know there are already several answers to this question but none of them helped me. My issue is that the router redirect doesn’t redirect to the correct page and I can’t find out why. My setup is: app-routing.module.ts export const routes: Routes = [ { path: ”, redirectTo: ‘start’, pathMatch: ‘full’ }, { path: […]

By BreadcrumbPie
Categorized as angular, redirect, routes Tagged , ,

From Angular to Angular – enable cross origin request

I am wondering, is it possible to allow cross origin request on a Angular Application ? I explain myself : 1st Angular application requests a server that return a 302 with location URL 302 is catch by browser, that redirect us on the URL let’s say that the URL points to an 2nd Angular application, […]

By Ugo Evola
Categorized as angular, cors, redirect Tagged , ,

Angular – handle a 302 redirection

I have seen several topics on the problem, but none of them with a clean and well constructed solution… So I’m re-launching the topic! I am on Angular v.12.1.1 I would like to hundle a 302 response cleanly. But the browser catches it before, and makes a GET request towards the location… I found a […]

how to handle authentication redirect with angular pwa service worker

I have an Angular 9 app that I just turned into a PWA using the @angular/pwa package in order to improve performance. When opening the application, it’s supposed to redirect to our company’s authentication page. However, after enabling service workers i am getting an error from my API because the user is not authenticated. From […]

1 2 3 7

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us