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

1.3K
Vistas
Cannot resolve symbol 'router-outlet'

The project is based on Angular 13.

Added routing to the project. app-routing.module.ts

import { NgModule } from '@angular/core';
import {RouterModule, Routes} from "@angular/router";
import {HomePageComponent} from "./home-page/home-page.component";

const appRoutes: Routes =[
  { path: '', component: HomePageComponent}
];

@NgModule({
  imports: [RouterModule.forRoot(appRoutes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }

added AppRoutingModule to the file app.module.ts

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import {ModalModule} from "ngb-modal";
import {FormsModule} from "@angular/forms";
import { HomePageComponent } from './home-page/home-page.component';
import {AppRoutingModule} from "./app-routing.module";

@NgModule({
  imports: [
    BrowserModule,
    FormsModule,
    AppRoutingModule
  ],
  declarations: [
    AppComponent,
    HomePageComponent
  ],

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

but if I try to add to the file app.component.html

<router-outlet></router-outlet>

IDEA throws an error

Cannot resolve symbol 'router-outlet'

But if I open another project with routing in the same IDE, there is no such error.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

I guess you are using WebStorm as an IDE, since i also ran into that warning when i upgraded my project to Angular 13, yet i didn't it on VSC.

Apparently in order to solve it you need to upgrade WebStorm to 2021.3. I recommend using JetBrains's toolbox app, which makes it easy to update.

over 4 years ago · Santiago Trujillo Denunciar
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