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
Getting Started with Angular 2 - UX Dev Summit ...
Search
Jeremy Wilken
February 13, 2016
Technology
0
180
Getting Started with Angular 2 - UX Dev Summit 2016
Get to know Angular 2 from a practical and full featured example!
Jeremy Wilken
February 13, 2016
Tweet
Share
More Decks by Jeremy Wilken
See All by Jeremy Wilken
Voice Activated UI - Devfest DC 2017
gnomeontherun
0
63
Voice Activated UI - ngconf 2017
gnomeontherun
0
300
Understanding Angular 1.5 Components
gnomeontherun
2
200
Angular 2 with TypeScript and ES6 - Fluent Conf 2016
gnomeontherun
2
160
Ionic, the Missing SDK
gnomeontherun
0
110
Angular 2, Building a Complete App With Typescript
gnomeontherun
1
250
Other Decks in Technology
See All in Technology
成長自己責任時代のあるきかた/How to navigate the era of personal responsibility for growth
kwappa
4
300
Where will it converge?
ibknadedeji
0
200
プロポーザルのコツ ~ Kaigi on Rails 2025 初参加で3名の登壇を実現 ~
naro143
1
160
M5製品で作るポン置きセルラー対応カメラ
sayacom
0
170
【Oracle Cloud ウェビナー】クラウド導入に「専用クラウド」という選択肢、Oracle AlloyとOCI Dedicated Region とは
oracle4engineer
PRO
3
120
"プロポーザルってなんか怖そう"という境界を超えてみた@TSUDOI by giftee Tech #1
shilo113
0
150
Geospatialの世界最前線を探る [2025年版]
dayjournal
0
160
Large Vision Language Modelを用いた 文書画像データ化作業自動化の検証、運用 / shibuya_AI
sansan_randd
0
130
多様な事業ドメインのクリエイターへ 価値を届けるための営みについて
massyuu
1
470
Why React!?? Next.jsそしてReactを改めてイチから選ぶ
ypresto
10
4.6k
SREとソフトウェア開発者の合同チームはどのようにS3のコストを削減したか?
muziyoshiz
1
110
Findy Team+のSOC2取得までの道のり
rvirus0817
0
500
Featured
See All Featured
Designing for Performance
lara
610
69k
GraphQLの誤解/rethinking-graphql
sonatard
73
11k
The Cost Of JavaScript in 2023
addyosmani
53
9k
Music & Morning Musume
bryan
46
6.8k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Practical Orchestrator
shlominoach
190
11k
Unsuck your backbone
ammeep
671
58k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Automating Front-end Workflow
addyosmani
1371
200k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Transcript
GETTING STARTED WITH ANGULAR 2 UXDSummit Feb 5, 2016 Jeremy
Wilken @gnomeontherun
INTRODUCTION Self Declared “Experience Engineer” at Teradata Lives in Austin,
TX Author of Ionic in Action, Angular 2 in Action Certified Beer Judge and Homebrewer
None
ES6 IN A NUTSHELL • New features: classes, modules, promises,
arrows, generators, and more. • Additive only, doesn’t remove existing features. • Most features can be transpiled to current ES5.
TYPESCRIPT IN A NUTSHELL • Transpiler to compile down to
ES6/5/3. • Adds strict typings to variables. • Only extends JavaScript syntax.
ES6/TYPESCRIPT PRIMER const stocks = ['AAPL', 'GOOG', 'FB', 'AMZN']; ES6
const keyword
ES6/TYPESCRIPT PRIMER let name = 'Jeremy'; let template = `
<h1>Template by ${name}</h1> <p>I can write markup without escaping and write on multiple lines!</p> `; ES6 inline multiline template strings
ES6/TYPESCRIPT PRIMER let stocks = ['aapl', 'goog', 'fb', 'amzn']; class
Dashboard { constructor() { stocks.forEach(stock => { this.add(stock.toUpperCase()); }); } add(stock) { this.stocks.push(stock); } } ES6 arrow functions
ES6/TYPESCRIPT PRIMER class Dashboard { constructor(service) { this.symbols = service.get();
} reset() { this.symbols = []; } } ES6 classes
ES6/TYPESCRIPT PRIMER import {service} from './service'; export class Dashboard {
constructor() { this.symbols = service.get(); } } ES6 modules
ES6/TYPESCRIPT PRIMER @Component({ selector: 'app' }) export class App {
} ES7 decorators
ES6/TYPESCRIPT PRIMER interface StockInterface { symbol: string, lastTradePriceOnly: number, change:
number, changeInPercent: number } let stocks: Array<StockInterface> = []; Typescript interfaces and type declarations
CODE TIME https://github.com/gnomeontherun/ angular2-uxdsummit
THE BASE Uses a node module lite-server as local server.
Files are transpiled with TypeScript.
Build & Server
THE APP COMPONENT Creating the app component, and bootstrapping it
Build & Server App Component index.html
THE STOCK SERVICE Creating a reusable service to manage stocks
collection
Build & Server App Component index.html Stock Service
THE SUMMARY COMPONENT Using directives, types, and bindings
Build & Server App Component index.html Stock Service Summary Component
THE DASHBOARD COMPONENT Loading data, using services, and importing components.
Build & Server App Component index.html Stock Service Summary Component
Dashboard Component
LET’S REVIEW Basic scaffolding to build and serve the app
App component is bootstraped to start rendering Services are used to load and manage data Simple components are nested to create larger features Pipes and directives manipulate rendered data
THANK YOU! Jeremy Wilken @gnomeontherun http://manning.com/books/angular-2-in-action