Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Getting Started with Angular 2 - UX Dev Summit ...

Jeremy Wilken
February 13, 2016

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

More Decks by Jeremy Wilken

Other Decks in Technology

Transcript

  1. 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
  2. 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.
  3. TYPESCRIPT IN A NUTSHELL • Transpiler to compile down to

    ES6/5/3. • Adds strict typings to variables. • Only extends JavaScript syntax.
  4. 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
  5. 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
  6. ES6/TYPESCRIPT PRIMER import {service} from './service'; export class Dashboard {

    constructor() { this.symbols = service.get(); } } ES6 modules
  7. ES6/TYPESCRIPT PRIMER interface StockInterface { symbol: string, lastTradePriceOnly: number, change:

    number, changeInPercent: number } let stocks: Array<StockInterface> = []; Typescript interfaces and type declarations
  8. THE BASE Uses a node module lite-server as local server.

    Files are transpiled with TypeScript.
  9. 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