Last active
October 7, 2017 01:50
-
-
Save TiagoNunesDeveloper/6426e5e77f5a2400bba9126e365b6bc9 to your computer and use it in GitHub Desktop.
@output EventEmitter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<jad-estudante *ngFor="let itemEstudante of estudantes" [estudante]="itemEstudante"></jad-estudante> | |
<jad-button *ngIf="!estudantes" (estudantesGet)="getEstudante($event)"></jad-button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from '@angular/core'; | |
import { Estudante } from './estudante.model'; | |
import { EstudanteService } from './estudante.service'; | |
@Component({ | |
selector: 'jad-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'], | |
}) | |
export class AppComponent { | |
public estudantes: Estudante[]; | |
constructor() {} | |
public getEstudante(estudantes) { | |
this.estudantes = estudantes; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment