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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Jeremy Wilken
February 13, 2016
Technology
180
0
Share
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
More Decks by Jeremy Wilken
See All by Jeremy Wilken
Voice Activated UI - Devfest DC 2017
gnomeontherun
0
82
Voice Activated UI - ngconf 2017
gnomeontherun
0
310
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
昔はシンプルだった_AmazonS3
kawaji_scratch
0
330
ネットワーク運用を楽にするAWS DevOps Agent活用法!! / 20260421 Masaki Okuda
shift_evolve
PRO
2
200
社内エンジニア勉強会の醍醐味と苦しみ/tamadev
nishiuma
0
180
AzureのIaC管理からログ調査まで、随所に役立つSkillsとCustom-Instructions / Boosting IaC and Log Analysis with Skills
aeonpeople
0
220
目的ファーストのハーネス設計 ~ハーネスの変更容易性を高めるための優先順位~
gotalab555
8
2.1k
AgentCore×VPCでの設計パターンn選と勘所
har1101
3
270
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.4k
レビューしきれない?それは「全て人力でのレビュー」だからではないでしょうか
amixedcolor
0
310
最近の技術系の話題で気になったもの色々(IoT系以外も) / IoTLT 花見予定会(たぶんBBQ) @都立潮風公園バーベキュー広場
you
PRO
1
230
Eight Engineering Unit 紹介資料
sansan33
PRO
3
7.3k
実践ハーネスエンジニアリング:TAKTで実現するAIエージェント制御 / Practical Harness Engineering: AI Agent Control Enabled by TAKT
nrslib
9
4.4k
AI駆動1on1〜AIに自分を育ててもらう〜
yoshiakiyasuda
0
120
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
A designer walks into a library…
pauljervisheath
211
24k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
380
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
890
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.4k
How to Ace a Technical Interview
jacobian
281
24k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
Thoughts on Productivity
jonyablonski
76
5.1k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
120
Design in an AI World
tapps
0
190
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
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