I have an application which uses angular2 for frontend part. Sometimes i got pretty strange bug: after login to the application i see two components simultaneously(login component and main component).
So, in the above screenshot, inputs for login functionality should not been seen.
It's the html code of the provided page.
Below i listed the content of app.component.html
:
<form name="header" class="form-horizontal" >
<div class="navbar-fixed-top cometflowHeader">
<label>CometFlow</label>
</div>
</form>
<div class="jumbotron" style="background-color: #fff; border: 3px; border-color: black;">
<div class="classol-sm-12">
<router-outlet></router-outlet>
</div>
</div>
And the routing configuration:
const appRoutes: Routes = [
{path: 'login', component: LoginComponent},
{path: '', component: HomeComponent, canActivate: [AuthGuard], pathMatch: 'full'},
// otherwise redirect to home
{path: '**', redirectTo: ''}
];
export const routing = RouterModule.forRoot(appRoutes, {useHash: true});
@NgModule({
imports: [
...,
routing
],
bootstrap: [AppComponent]
})
Can somebody give me direction where should i look for the problem? Because right now i don't have a clue why is this happen. I don't see any errors in browser's console.