Created
July 24, 2021 01:22
-
-
Save tiagolpadua/45077705431ec7e798205f00550acd26 to your computer and use it in GitHub Desktop.
cmail-card
This file contains hidden or 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
<h3>{{cabecalho}}</h3> | |
<p> | |
{{corpo}} | |
</p> | |
<h5>{{rodape}}</h5> |
This file contains hidden or 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, Input, OnInit } from '@angular/core'; | |
@Component({ | |
selector: 'cmail-card', | |
templateUrl: './cmail-card.component.html', | |
styles: [ | |
] | |
}) | |
export class CmailCardComponent implements OnInit { | |
@Input() | |
cabecalho = ''; | |
@Input() | |
corpo = ''; | |
@Input() | |
rodape = ''; | |
constructor() { } | |
ngOnInit(): void { | |
} | |
} |
This file contains hidden or 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
<p>login works!</p> | |
<cmail-card [cabecalho]="aluno1.nome" [corpo]="aluno1.cargo" [rodape]="aluno1.disciplina"> | |
</cmail-card> | |
<hr> | |
<cmail-card [cabecalho]="aluno2.nome" [corpo]="aluno2.cargo" [rodape]="aluno2.disciplina"> | |
</cmail-card> | |
<hr> | |
<cmail-card [cabecalho]="aluno3.nome"> | |
</cmail-card> |
This file contains hidden or 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, OnInit } from '@angular/core'; | |
@Component({ | |
selector: 'app-login', | |
templateUrl: './login.component.html', | |
styleUrls: ['./login.component.css'] | |
}) | |
export class LoginComponent implements OnInit { | |
aluno1 = { | |
nome: "João", | |
cargo: "Estudante", | |
disciplina: "Fisica" | |
} | |
aluno2 = { | |
nome: "Carlos", | |
cargo: "Professor", | |
disciplina: "Engenharia" | |
} | |
aluno3 = { | |
nome: "Raul" | |
} | |
constructor() { } | |
ngOnInit(): void { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment