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

The awesomeness of Angular 2

The awesomeness of Angular 2

Ciro Nunes

April 24, 2015
Tweet

More Decks by Ciro Nunes

Other Decks in Programming

Transcript

  1. Angular 2 ready 1.4 New Router New I18n CommonJS support

    Better animation support Performance improvements
  2. Configurable 3-10x faster Trees instead of cycling graphs Change detection

    http://victorsavkin.com/post/110170125256/change-detection-in-angular-2
  3. Directives Angular 1 angular.module('myApp') .directive('myComponent', function() { return { template:

    '<p>Meaning of life is {{ meaningOfLife }}</p>', bindToController: true, controller: function() { this.meaningOfLife = 42; } }; })
  4. Annotations (optional) @Component({ selector: 'my-component' }) @View({ template: `<p>The meaning

    of life is {{ meaningOfLife }}</p>` }) class MyComponent { constructor() { this.meaningOfLife = 42; } }
  5. Types (completely optional) @Component({ selector: 'my-component' }) @View({ template: `<p>The

    meaning of life is {{ meaningOfLife }}</p>` }) class MyComponent { meaningOfLife: number; constructor() { this.meaningOfLife = 42; } }
  6. Toolable Power in the hands of the user Fewer rules

    to remember Template syntax Play nice with Web Components