CHECKLIST REVIEW
-
PORTINARI-STYLE:
- Simular problema (se houver)
- Baixar a branch
- buildar
- Rodar o watch e o live-server
- Verificar samples do CDN
- Comparar com o Zeplin
CYAN='\033[0;36m' | |
GREEN='\033[0;32m' | |
# Caminho dos repositórios | |
caminho=/home/alvaro/totvs/git | |
# Caminho do repositório do portinari-style | |
repositorioPortinariStyle=$caminho/portinari-style | |
# Caminho do repositório do portinari-angular |
CHECKLIST REVIEW
PORTINARI-STYLE:
import { HttpClient } from '@angular/common/http'; | |
import { Component, OnInit } from '@angular/core'; | |
import { Observable } from 'rxjs'; | |
import { People, Planet } from '../model/api'; | |
@Component({ | |
selector: 'app-example-sync', | |
templateUrl: './example-sync.component.html', | |
styleUrls: ['./example-sync.component.css'] |
<h1>Personagem</h1> | |
<section *ngIf="people$ | async as people"> | |
<p>Nome: {{ people.name }}</p> | |
<p>Nascimento: {{ people.birth_year }}</p> | |
<p>Cor do Olho: {{ people.eye_color }}</p> | |
</section> | |
<br /> | |
<h1>Planeta</h1> | |
<section *ngIf="planet$ | async as planet"> | |
<p>Nome: {{ planet.name }}</p> |
import { HttpClient } from '@angular/common/http'; | |
import { Component, OnDestroy, OnInit } from '@angular/core'; | |
import { SubSink } from 'subsink'; | |
import { People, Planet } from '../model/api'; | |
@Component({ | |
selector: 'app-example-subsink', | |
templateUrl: './example-subsink.component.html', | |
styleUrls: ['./example-subsink.component.css'] |
@Component({ | |
selector: 'app-example-normal', | |
templateUrl: './example-normal.component.html', | |
styleUrls: ['./example-normal.component.css'] | |
}) | |
export class ExampleNormalComponent implements OnInit, OnDestroy { | |
people: People; | |
planet: Planet; | |
private subPeople: Subscription; |
ngOnDestroy() { | |
if (this.subPeople) { | |
this.subPeople.unsubscribe(); | |
} | |
} |
ngOnInit() { | |
this.subPeople = this.http | |
.get<People>('https://swapi.co/api/people/1/') | |
.subscribe((data: People) => { | |
this.people = data; | |
}); | |
} |
this.subPeople = this.http | |
.get<People>('https://swapi.co/api/people/1/') | |
.subscribe((data: People) => { | |
this.people = data; | |
}); | |
this.subPeople.unsubscribe(); |
this.http | |
.get<People>('https://swapi.co/api/people/1/') | |
.subscribe((data: People) => { | |
this.people = data; | |
}); |