Angular the Good Parts

Post on 13-Apr-2017

314 views 0 download

Transcript of Angular the Good Parts

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

Thanks Jedi!(delivered by @krzychukula)

Angular 1.*

API explosion

Scalable

Angular 2

80/20

Simple Rules

6 Simple Rules

Let go of:

ng-controller

1

Use:

.directive

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

Let go of:

$scope

2

Use:

controllerAs: 'ctrl',

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

Let go of:

link

3

Use:

controller

Let go of:

templateUrl

4

Use:

template

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

function positions() { return {

//next slide }}

scope: {}, bindToController: {

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

Let go of:

$rootScope

5

Let go of:

.provider

6

Work in progress

Use:

.factory

Use:

.service

Feedback?

Thanks!(delivered by @krzychukula)