getting started with angular 2

Post on 16-Apr-2017

6.843 Views

Category:

Internet

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Getting Started with Angular 2

Slides: tinyurl.com/ng2-slides

Angular 2

Is Awesome

Still in Alpha

might seem like too much to learn

Angular 2 is Based on:

○ ES6/TypeScript○ Module Loaders○ DOM○ Web Components○ Observables○ ZoneJS○ AngularJS 1.x

Hello Worldhttp://plnkr.co/edit/fHjekGdnscbZGoPhbsE8?p=preview

Template Syntax / DOM

● No more jqLite● No more ng-click, ng-mousedown, ng-blur, etc.● No more ng-show, ng-hide, ng-disabled, etc.● Relies directly on the DOM

ComponentsAngular 1.x: http://plnkr.co/edit/fZKUdNpN3k2joBVrXz5r?p=previewAngular 2.0: http://plnkr.co/edit/GA57df9esLI7MyPbyXjb?p=preview

AngularJS 1.x Component: Best Practices

Angular 1 to 2: Component

Angular 1 Components Best Practices

Avoid

● $scope● $scope● $scope● The link function● $parse, $observe, $eval

Use

● Isolated Scope● ControllerAs● BindToController● ES6 classes

Observableshttp://plnkr.co/edit/eOh0fJlx1OBsYCXd7uK9?p=preview

Angular AMA3:45 - 4:30pm B-SIDE ROOM

Aysegul Yonet Nick Van Weerdenburg Rob McDiarmid

top related