Pessoal em home component html não está aparecendo as rotas filhas no lado direito da tela, somente a imagem a esquerda. Está aparecendo esse erro no console:
Error: src/app/home/home.component.html:8:11 - error NG8001: 'router-outlet' is not a known element:
1. If 'router-outlet' is an Angular component, then verify that it is part of this module.
2. If 'router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
8 <router-outlet></router-outlet>
Segue app routing module:
import { HomeComponent } from './home/home.component';
import { PhotoFormComponent } from './photos/photo-form/photo-form.component';
import { PhotosListComponent } from './photos/photos-list/photos-list.component';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { NotFoundComponent } from './errors/not-found/not-found.component';
import { Resolver } from './photos/photos-list/photos-list.resolver';
import { SignInComponent } from './home/signin/signin.component';
import { AuthGuard } from './core/auth/auth.guard';
import { SignUpComponent } from './home/signup/signup.component';
const routes: Routes = [
{
path: '',
component: HomeComponent,
canActivate: [AuthGuard],
children: [
{
path: '',
component: SignInComponent,
},
{
path: 'signup',
component: SignUpComponent,
},
],
},
{
path: 'users/:userName',
component: PhotosListComponent,
resolve: { photos: Resolver },
},
{ path: 'p/add', component: PhotoFormComponent },
{ path: '**', component: NotFoundComponent },
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule {}