Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

163
Vistas
How to apply conditional routing in Angular where the condition is to make sure that the previous page has been visited?

I have an Angular web app where to sign up you go through different pages:

  1. Fill in your name and email
  2. Fill in your password
  3. Fill in your confirmation code

Hence the URL changes from website.com/intake to website.com/intake/signup to website.com/intake/confirmation.

My problem is that it is currently possible for a user to change the url from website.com/intake to website.com/intake/signup and finish the registration without filling the other information. I would like to prevent that but I am not sure how to use routing in this case.

I want to make sure that the user can go to the next page only if he has been to the first one and has filled in. Now I know, if I make the form fields * required it will not allow the user to go further but he will still be able to bypass that by changing the URL.

How do I solve that?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can use guards. Create a conditional to restrict the route you wish.

If the user hasn't filled the form, redirect him to the form.

Angular guards tutorial

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda