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

Around Angular2

Around Angular2

A talk about the features around Angular2 stack.

Filippo Gangi Dino

October 27, 2016
Tweet

More Decks by Filippo Gangi Dino

Other Decks in Programming

Transcript

  1. TS TYPE INFORMATIONS add(a: number, b?: number) => { return

    a + b; } let list: number[] = [1,2,3]; let isDone: boolean = false;
  2. TS CLASSES CAN BE TYPES class Bar { bar: Foo

    } let bar = new Bar(new Foo()) // valid let bar = new Bar(new Baz()) // error
  3. TS INTERFACES interface Person { firstName: string[]; lastName: string; }

    let mat_gan:Person = { firstName: ['Mohandas', 'Karamchand'], lastName: 'Gandhi' }
  4. TIMING // code start(); a(); setTimeout(b, 0); setTimeout(c, 0); d();

    stop(); // start a d // stop b // missed! c // missed!
  5. TRANSITIVE function first() { setTimeout(second, 0); } function second() {

    setTimeout(third, 0); } function third() { … } zone.run(first);