Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Angular: Um framework. Mobile & desktop.
Search
Ciro Nunes
October 22, 2016
Programming
630
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Angular: Um framework. Mobile & desktop.
Ciro Nunes
October 22, 2016
Transcript
63 slides
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!
More Decks by Ciro Nunes
See All by Ciro Nunes
Rust Front-end with Yew
cironunes
0
120
Type safe CSS with Reason
cironunes
0
170
What I've learned building automated docs for Ansarada's design system
cironunes
0
110
Beyond ng new
cironunes
2
270
Animate your Angular apps
cironunes
0
480
Sweet Angular, good forms never felt so good
cironunes
0
120
Sweet Angular, good forms never felt so good
cironunes
0
340
Progressive Angular apps
cironunes
3
960
Firebase & Angular
cironunes
0
320
Other Decks in Programming
See All in Programming
Kotlin JVM用に作られたライブラリのKMPを前提とした再設計
jsoizo
0
240
眠らない開発チームの作り方
biwakonbu
0
180
Agentic AI with the Power of Jakarta EE
ivargrimstad
0
250
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
470
AIエージェントの「テストは通るのに本番で壊れる」を減らす
shibuiwilliam
3
130
Skills Are the New npm [AAIF Bengaluru, Nov 2026]
shivamsaraswat
0
140
Kiro Crewによる開発体験ーKiro CrewでStrands Decider 2B に関する技術検証をやってみた
satoshi256kbyte
1
240
エージェントの管理もエージェントに – herdr-core と自作バックログで作る司令塔 –
nearme_tech
PRO
2
180
Claude Codeのおかげでやりたいことがやれるようになったんだよォー!
sms_tech
0
190
テストだけで見つかる? Rubyでつくるメソッド発掘器
izawa
0
180
The Cost of the DOM
ypresto
6
3.6k
自宅サーバはどこまで再現できるのか - Proxmox VE上のVM環境をIaCとバックアップで戻してみた
youto
0
450
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.5k
Darren the Foodie - Storyboard
khoart
PRO
5
4.1k
The untapped power of vector embeddings
frankvandijk
2
2k
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
600
Crafting Experiences
bethany
1
460
Skip the Path - Find Your Career Trail
mkilby
1
310
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.7k
The Limits of Empathy - UXLibs8
cassininazir
2
810
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
560
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
830
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.5k
Marketing to machines
jonoalderson
1
6k