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

133
Vistas
angular 2/4 make route standalone

is there a way i can make the path login and logincomponent load as standalone and not in need for a <router-outlet></router-outlet> ?

because AppComponent currently loads the template in it, then i will show sub-pages with <router-outlet></router-outlet>, but i dont want login to be a child, i want it to be a standalone page.

EDIT: All i want is for the login page to not go trough the app.component.html, instead i want it to go trough another template instead, cause app.component.html holds my logged in template.

   import { BrowserModule } from '@angular/platform-browser';
    import { NgModule } from '@angular/core';
    import { FormsModule } from '@angular/forms';
    import { HttpModule } from '@angular/http';
    import { RouterModule } from '@angular/router';



import { AppComponent } from './app.component';
import { CoreService } from './core.service';

import { LoginhandlerComponent } from './loginhandler/loginhandler.component';
import { CoreComponent } from './core/core.component';
import { MinionsComponent } from './minions/minions.component';
import { RegistrationComponent } from './registration/registration.component';

@NgModule({
  declarations: [
    AppComponent,
    LoginhandlerComponent,
    CoreComponent,
    MinionsComponent,
    RegistrationComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    RouterModule.forRoot([
      {
        path : 'minions',
        component: MinionsComponent

      },
      {
        path: 'login',
        component: LoginhandlerComponent
      }
        ]

    )
  ],
  providers: [CoreService, ],
  bootstrap: [AppComponent, ]
})
export class AppModule { }

app.component:

<div>

</div>


<router-outlet></router-outlet>
over 4 years ago · Santiago Trujillo
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