Angular the Good Parts

33
Angular the Good Parts (work in progress by @krzychukula)

Transcript of Angular the Good Parts

Page 1: Angular the Good Parts

Angular the Good Parts(work in progress by @krzychukula)

Page 2: Angular the Good Parts
Page 3: Angular the Good Parts

Thanks Jedi!(delivered by @krzychukula)

Page 4: Angular the Good Parts
Page 5: Angular the Good Parts

Angular 1.*

Page 6: Angular the Good Parts
Page 7: Angular the Good Parts

API explosion

Page 8: Angular the Good Parts

Scalable

Page 9: Angular the Good Parts

Angular 2

Page 10: Angular the Good Parts

80/20

Page 11: Angular the Good Parts

Simple Rules

Page 12: Angular the Good Parts

6 Simple Rules

Page 13: Angular the Good Parts

Let go of:

ng-controller

1

Page 14: Angular the Good Parts

Use:

.directive

Page 15: Angular the Good Parts

$stateProvider .state('positions', { url: '/positions', template: '<positions></positions>' })

Page 16: Angular the Good Parts

Let go of:

$scope

2

Page 17: Angular the Good Parts

Use:

controllerAs: 'ctrl',

Page 18: Angular the Good Parts

Use:scope: {},bindToController: { count: '='},

Page 19: Angular the Good Parts

Let go of:

link

3

Page 20: Angular the Good Parts

Use:

controller

Page 21: Angular the Good Parts

Let go of:

templateUrl

4

Page 22: Angular the Good Parts

Use:

template

Page 23: Angular the Good Parts

angular.module('positions').directive('positions', positions);

Page 24: Angular the Good Parts

function positions() { return {

//next slide }}

Page 25: Angular the Good Parts

scope: {}, bindToController: {

data: “=” }, controller: require('./positions-controller'), controllerAs: 'positions', template: require("./views/positions-page.jade")

Page 26: Angular the Good Parts

Let go of:

$rootScope

5

Page 27: Angular the Good Parts

Let go of:

.provider

6

Page 28: Angular the Good Parts

Work in progress

Page 29: Angular the Good Parts

Use:

.factory

Page 30: Angular the Good Parts

Use:

.service

Page 31: Angular the Good Parts

Feedback?

Page 33: Angular the Good Parts

Thanks!(delivered by @krzychukula)