Olá pessoal. O Angular não está detectando minha rota e não há erros no console.
\weather
Vejam como estão meus arquivos:
import { NgModule } from "@angular/core";
import { RouterModule, Routes } from '@angular/router'
import { NotFoundComponent } from "src/app/weather/not-found/not-found.component";
import { WeatherComponent } from "src/app/weather/weather/weather.component";
const routes : Routes = [
{path: '**', component: NotFoundComponent},
{path: 'weather', component: WeatherComponent }
];
@NgModule({
imports: [ RouterModule.forRoot(routes) ],
exports: [ RouterModule ]
})
export class AppRoutingModule {
}
import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { NotFoundComponent } from "src/app/weather/not-found/not-found.component";
import { WeatherComponent } from "src/app/weather/weather/weather.component";
@NgModule({
declarations: [
NotFoundComponent,
WeatherComponent
],
exports: [
NotFoundComponent,
WeatherComponent
],
imports: [ CommonModule ]
})
export class WeatherModule{
}
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { WeatherModule } from 'src/app/weather/weather.module';
import { AppRoutingModule } from 'src/app/app.routing.module';
;
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
WeatherModule,
AppRoutingModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
App.html:
<router-outlet></router-outlet>
Alguém tem ideia do que há?