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

125
Vistas
Is there a way to do NodeJs Express style Parameters in Angular?

I am wondering if there is a way to have a Parameter in Angular route that is similar to NodeJs Style ?

i have a route which looks like this "**http://myhost.domain.com/signin**" and i want to be able to pass an id for the signin request. I know i can do it like this "http://myhost.domain.com/signin?id=123456", but i am looking to do it more like a nodejs style where it would look like this http://myhost.domain.com/signin/123456

currently i read the params like this, but when i use the above url it cant find it since it thinks its one level deeper route.

    ngOnInit() {
            this.route.queryParams
                .subscribe(params => {
            console.log(params); 
    
          }
        );
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Yes, you can do it. First, you need to configure the route in the Router:

const routes: Routes = [
  { path: 'signin/:id', component: SignInComponent }
]

Then, you can access it in the component like this:

import { ActivatedRoute } from '@angular/router';

...

constructor(private route: ActivatedRoute) {}

...

ngOnInit() {
  const id = this.route.snapshot.params.id;
}
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