Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

132
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!