Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

[RESOLVIDO] Minha página não aparece, não sei porquê

Passamos boa parte da aula 4 sem renderizar a aplicação e fazendo uma série de modificações no código, segui todos os passos, reiniciei o vscode, terminal e navegador. Ao final da parte 7 da aula 4 finalmente o professor acessa a rota user/flavio e a aplicação é renderizada, porém no meu projeto o mesmo efeito não aconteceu e não consigo achar onde errei, meu console não mostra erro nenhum, dessa forma estou totalmente perdida.

APP MODULE

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { PhotosModule } from './photos/photos.module';
import { AppRoutingModule } from './app.routing.module';

@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    PhotosModule,
    AppRoutingModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

APP ROUTING MODULE

import { NgModule } from '@angular/core';
import { Routes, RouterModule } from "@angular/router";
import { PhotoFormComponent } from './photos/photo-form/photo-form.component';
import { PhotoListComponent } from './photos/photo-list/photo-list.component';

const routes: Routes = [
  {
    path: 'photos',
    component: PhotoListComponent
  },
  {
    path: 'form',
    component: PhotoFormComponent
  }
]

@NgModule({
  imports: [ RouterModule.forRoot(routes) ],
  exports: [ RouterModule ]
})

export class AppRoutingModule {}

PHOTOS MODULE

import { CommonModule } from '@angular/common';
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';

import { PhotoListComponent } from './photo-list/photo-list.component';
import { PhotoComponent } from './photo/photo.component';
import { PhotoFormComponent } from './photo-form/photo-form.component';

@NgModule ({
    declarations: [ PhotoComponent, PhotoListComponent, PhotoFormComponent ],
    imports: [ HttpClientModule, CommonModule]
})

export class PhotosModule {}

no app.component.html tem somente a tag router-outlet

1 resposta
solução!

Tudo correto na aplicação, reiniciei o localhost pelo terminal e funcionou, o que mudou nessa reinicialização não sei dizer.