Date post: | 13-Apr-2017 |
Category: |
Technology |
Upload: | krzysztof-kula |
View: | 314 times |
Download: | 0 times |
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?
Inspirations● https://medium.com/@bluepnume/sane-scalable-angular-apps-are-tricky-but-not-impossible-
lessons-learned-from-paypal-checkout-c5320558d4ef● http://toddmotto.com/exploring-the-angular-1-5-component-method/● http://teropa.info/blog/2015/10/18/refactoring-angular-apps-to-components.html● http://juristr.com/blog/2015/07/learning-ng-prepare-ng2/
Thanks!(delivered by @krzychukula)