Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Angular: Um framework. Mobile & desktop.
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Ciro Nunes
October 22, 2016
Programming
1
600
Angular: Um framework. Mobile & desktop.
Ciro Nunes
October 22, 2016
Tweet
Share
More Decks by Ciro Nunes
See All by Ciro Nunes
Rust Front-end with Yew
cironunes
0
63
Type safe CSS with Reason
cironunes
0
140
What I've learned building automated docs for Ansarada's design system
cironunes
0
84
Beyond ng new
cironunes
2
220
Animate your Angular apps
cironunes
0
440
Sweet Angular, good forms never felt so good
cironunes
0
90
Sweet Angular, good forms never felt so good
cironunes
0
310
Progressive Angular apps
cironunes
3
920
Firebase & Angular
cironunes
0
300
Other Decks in Programming
See All in Programming
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
200
文字コードの話
qnighy
44
17k
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
380
守る「だけ」の優しいEMを抜けて、 事業とチームを両方見る視点を身につけた話
maroon8021
3
850
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
140
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
180
OTP を自動で入力する裏技
megabitsenmzq
0
100
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.1k
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
140
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
220
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
340
AHC061解説
shun_pi
0
370
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
71
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
310
Side Projects
sachag
455
43k
AI: The stuff that nobody shows you
jnunemaker
PRO
3
390
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
1
160
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
310
The agentic SEO stack - context over prompts
schlessera
0
690
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
62
51k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
100
Transcript
Um framework. Mobile & desktop.
Ciro Nunes @cironunesdev
None
None
Um framework. Mobile & desktop.
2. Como distribuir para múltiplas plataformas 3. Arquitetura e um
pouco de código 1. O que faz o Angular 2 ser tão bom?
2. Como distribuir para múltiplas plataformas 3. Arquitetura e um
pouco de código 1. O que faz o Angular 2 ser tão bom?
Múltiplas plataformas
Performance
Change Detection t AoT Compiler Algumas coisas que deixam o
Angular 2 rápido t Optimized JS code for VM + Three shaking t Three shaking Unidirectional data flow Route Lazy loading t Smarter change detection
Experiência do desenvolvedor
Simplicidade
FILTERS (PIPES) sem perder as features que nós conhecemos e
amamos DATA BINDING DEPENDENCY INJECTION COMPONENTS DIRECTIVES ROUTING & NAVIGATION MODULES TESTING
None
Ferramentas http://slides.com/gerardsans/imworld-ng2-revolution#/4/4
None
TS ES7 ES2016 ES6 ES2015 ES5
Extensões
None
None
None
None
http://fiber.google.com/
http://builtwithangular2.com/
1. O que faz o Angular 2 ser tão bom?
2. Como distribuir para múltiplas plataformas 3. Arquitetura e um pouco de código
Desktop
Responsive Web Apps
Native
Mobile
Native (NativeScript)
Progressive Web Apps
Hybrid
1. O que faz o Angular 2 ser tão bom?
2. Como distribuir para múltiplas plataformas 3. Arquitetura e um pouco de código
None
~ $ npm i -g angular-cli ~ $ ng new
my-project ~ $ ng serve ~ $ ng test ~ $ ng build --prod
Components
~ $ ng generate component app
export class AppComponent { title = 'app works!'; } import
{ Component } from '@angular/core'; @Component({ selector: 'app-root', template: `<h1>{{title}}</h1>`, styleUrls: ['./app.component.css'] })
export class AppComponent { title = 'app works!'; } import
{ Component } from '@angular/core'; @Component({ selector: 'app-root', template: `<h1>{{title}}</h1>`, styleUrls: ['./app.component.css'] })
export class AppComponent { title = 'app works!'; } @Component({
selector: 'app-root', template: `<h1>{{title}}</h1>`, styleUrls: ['./app.component.css'] }) import { Component } from '@angular/core';
Data binding
http://jsbin.com/hayiyuyeve/edit?html,js,output
@Component({ selector: 'my-greeting', template: ` <input type="text" [(ngModel)]="hero.name"> <h2>Hello, {{hero.name}}</h2>
`, }) export class Greeting { constructor() { this.hero = { name: 'Ciro' } } } http://plnkr.co/edit/MGnF3Ta5IOPYYAyXjFpl?p=preview
Binding Example Properties <fy-rating [rating]="feedback.rating"> Events <fy-rating (onRate)="feedback.update($event)"> Two-way <input
type="text" [(ngModel)]="user.name">
Services
~ $ ng generate service feedback
@Injectable() export class FeedbackService { constructor() { } }
@Injectable() export class FeedbackService { private feedbacksUrl = 'http://localhost:4222/feedbacks'; constructor(private
http: Http) { } getFeedbacks(): Observable<Feedback[]> { return this.http.get(this.feedbacksUrl) .map(this.extractData); } }
Dependency Injection
@Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'], providers: [FeedbackService] })
export class AppComponent implements OnInit { feedbacks: Feedback[]; constructor(private feedbackService: FeedbackService) {} ngOnInit() { this.feedbackService.getFeedbacks() .subscribe(feedbacks => this.feedbacks = feedbacks); } }
@Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'], providers: [FeedbackService] })
export class AppComponent implements OnInit { feedbacks: Feedback[]; constructor(private feedbackService: FeedbackService) {} ngOnInit() { this.feedbackService.getFeedbacks() .subscribe(feedbacks => this.feedbacks = feedbacks); } }
Directives
~ $ ng generate directive highlight
@Directive({ selector: '[myHighlight]' }) export class HighlightDirective { constructor(el: ElementRef,
renderer: Renderer) { renderer.setElementStyle(el.nativeElement, 'backgroundColor', 'yellow'); } }
@Directive({ selector: '[myHighlight]' }) export class HighlightDirective { constructor(el: ElementRef,
renderer: Renderer) { renderer.setElementStyle(el.nativeElement, 'backgroundColor', 'yellow'); } }
Pipes
@Component({ selector: 'hero-birthday', template: `<p>The hero's birthday is {{ birthday
| date }}</p>` }) export class HeroBirthdayComponent { birthday = new Date(1988, 3, 15); // April 15, 1988 }
Modules
import { NgModule } from '@angular/core'; import { BrowserModule }
from '@angular/platform-browser'; import { AppComponent } from './app.component'; @NgModule({ imports: [ BrowserModule ], declarations: [ AppComponent ], bootstrap: [ AppComponent ] }) export class AppModule { }
import { NgModule } from '@angular/core'; import { BrowserModule }
from '@angular/platform-browser'; import { AppComponent } from './app.component'; @NgModule({ imports: [ BrowserModule ], declarations: [ AppComponent ], bootstrap: [ AppComponent ] }) export class AppModule { }
http://github.com/cironunes/feedbacky
@cironunesdev
Obrigado!