Skip to content

Instantly share code, notes, and snippets.

View MartinhoMCM's full-sized avatar
💭
Iam ready!

Martinho Mussamba MartinhoMCM

💭
Iam ready!
View GitHub Profile
@MartinhoMCM
MartinhoMCM / pai.component.html
Last active April 6, 2022 10:23
pai.component.html
<div>
<h1>Próximos Eventos do Angular</h1>
<hr/>
<div>
<h2>{{event.name}}</h2>
<div>Data: {{event.date}}</div>
<div>Hora: {{event.time}}</div>
<div>Preço: \${{event.price}}</div>
<div>
<span>Local: {{event.location.address}}</span>
@MartinhoMCM
MartinhoMCM / pai.component.ts
Created April 6, 2022 10:21
pai.component.ts
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-pai',
templateUrl: './pai.component.html',
styleUrls: ['./pai.component.css']
})
export class PaiComponent implements OnInit {
constructor() { }
@MartinhoMCM
MartinhoMCM / pai.component.html
Created April 6, 2022 13:00
pai.component.html
<div>
<h1>Próximos Eventos do Angular</h1>
<h1>Olá {{message}}</h1>
<hr/>
<app-filho [event]="event" (outPutEvent)="handleClickedEvent($event)"></app-filho>
</div>
@MartinhoMCM
MartinhoMCM / pai.component.ts
Created April 6, 2022 13:07
pai.component.ts
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-pai',
templateUrl: './pai.component.html',
styleUrls: ['./pai.component.css']
})
export class PaiComponent implements OnInit {
constructor() { }
@MartinhoMCM
MartinhoMCM / filho.component.ts
Last active April 6, 2022 13:25
filho.component.ts
import { Component, Input, OnInit, Output,EventEmitter } from '@angular/core';
@Component({
selector: 'app-filho',
templateUrl: './filho.component.html',
styleUrls: ['./filho.component.css']
})
export class FilhoComponent implements OnInit {
@Input() event;