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

module.id

Meus titulos não são carregados, porém as imagens sim. Suspeito de algum erro no component do painel. painel.component.ts

import { Component, Input } from '@angular/core';

@Component({
    moduleId: module.id ,
    selector: 'painel',
    templateUrl: './painel.component.html'
})

export class PainelComponent{

    @Input() titulo: string;
}

painel.module.ts

import { NgModule } from '@angular/core';
import { PainelComponent } from './painel.component';

@NgModule ({
    declarations: [ PainelComponent ],
    exports: [ PainelComponent ]    
})
export class PainelModule {

}

app.component.html

<div class="jumbotron">
    <h1 class="text-center">AluraPic</h1>
</div>
<div class="container">
    <div class="row">
        <painel *ngFor="let foto of fotos" titulo="{{foto.titlo}}">
            <foto titulo="{{foto.titulo}}" url="{{foto.url}}"></foto>
        </painel>
    </div>
</div>

app.module.ts

import 'rxjs/add/operator/map';

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { FotoModule } from './foto/foto.module';
import { PainelModule } from './painel/painel.module';
import { HttpModule } from '@angular/http';


@NgModule({
    imports: [ BrowserModule, FotoModule, HttpModule, PainelModule ],
    declarations: [ AppComponent ],
    bootstrap: [ AppComponent ]
})

export class AppModule {}
1 resposta
solução!

No seu arquivo app.component.html você tem o seguinte:

  <painel *ngFor="let foto of fotos" titulo="{{foto.titlo}}">

O nome do título está escrito errado. Tente fazer o seguinte ajuste:

  <painel *ngFor="let foto of fotos" titulo="{{foto.titulo}}">

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software