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>