Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

161
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda