SlideShare a Scribd company logo
Migrating to Angular 2
Why use Angular 2
● Takes advantage of modern web standards
○ ES6
○ TypeScript
○ Web Components
○ Observables
○ Module Loaders
○ ZoneJS
● Removes many unnecessary concepts from Angular 1
● Performance
What is ng-upgrade?
● Lets you run angular 1 and 2 in the same app
● Use Angular 1 service in Angular 2
● Use Angular 1 component in Angular 2
● Use Angular 2 service in Angular 1
● Use Angular 2 component in Angular 1
Preparation Overview
● $watch
● Isolate scope
● Controller as
● $parent
● .component()
● TypeScript
● .service()
● SystemJS
$watch
Format date with: $watch
<body ng-app="myApp" ng-controller= "MainCtrl as ctrl">
Date: <input type="text" ng-model="ctrl.rawDate">
<div>Formatted Date: {{ ctrl.dateStr}}</div>
</body>
function MainCtrl($scope) {
var self = this;
$scope.$watch('ctrl.rawDate', function(newVal) {
if (newVal !== undefined) {
self.dateStr = moment(self.rawDate).format('MMM DD YYYY');
}
});
}
Plunker
Format date with: ng-change
<body ng-app="myApp" ng-controller= "MainCtrl as ctrl">
<h1>Date Formatter</ h1>
Date: <input type="text" ng-model="ctrl.rawDate" ng-change="ctrl.onChange()">
<div>Formatted Date: {{ ctrl.dateStr}}</div>
</body>
function MainCtrl() { }
MainCtrl.prototype.onChange = function() {
this.dateStr = moment(this.rawDate).format('MMM DD YYYY');
};
Plunker
Format date with: getterSetter
<body ng-app="myApp" ng-controller= "MainCtrl as ctrl">
<h1>Date Formatter</ h1>
Date: <input type="text"
ng-model="ctrl.rawDate"
ng-model-options= "{ getterSetter: true }">
<div>Formatted Date: {{ ctrl.dateStr}}</div>
</body>
function MainCtrl() { }
MainCtrl.prototype.rawDate = function(rawDate) {
if (rawDate !== undefined) {
this._rawDate = rawDate;
this.dateStr = moment(rawDate). format('MMM DD YYYY');
} else {
return this._rawDate;
}
};
Plunker
Format date with: function
<body ng-app="myApp" ng-controller= "MainCtrl as ctrl">
<h1>Date Formatter</ h1>
Date: <input type="text" ng-model="ctrl.rawDate">
<div>Formatted Date: {{ ctrl.getDateStr()}}</div>
</body>
function MainCtrl() { }
MainCtrl.prototype.getDateStr = function() {
if (this.rawDate !== undefined) {
return moment(this.rawDate).format('MMM DD YYYY');
}
};
Plunker
Image Share Demo
github.com/robianmcd/angular-migration
Why avoid $watch?
● Hard to reason about
● Not declarative
● Creates unnecessary watcher
● Not in Angular 2
isolate scope
angular.module('imageShare').directive('imageEditorModal', function () {
return {
restrict: 'E',
templateUrl: 'src/components/imageEditorModal/imageEditorModal.html',
link: function(scope) {
scope. close = function () {
scope. showModal = false;
scope. url = '';
scope. description = '';
};
scope. submit = function() {
scope. uploadNewImage ({/*...*/});
scope. close();
};
}
};
});
imageEditorModal
angular.module('imageShare').directive('imageEditorModal', function () {
return {
restrict: 'E',
templateUrl: 'src/components/imageEditorModal/imageEditorModal.html',
scope: {},
link: function(scope) {
scope. close = function () {
scope .$parent.showModal = false;
scope. url = '';
scope. description = '';
};
scope. submit = function() {
scope .$parent.uploadNewImage({ /*...*/});
scope. close();
};
}
};
});
imageEditorModal
angular.module('imageShare').directive('imageEditorModal', function () {
return {
restrict: 'E',
templateUrl: 'src/components/imageEditorModal/imageEditorModal.html',
scope: {
show: '=',
onSubmit: '&'
},
link: function(scope) {
scope. close = function () {
scope. show = false;
scope. url = '';
scope. description = '';
};
scope. submit = function() {
scope. onSubmit({$image: {/*...*/}});
scope. close();
};
}
};
imageEditorModal
<image-editor-modal></image-editor-modal>
imageList.html
Before
<image-editor-modal
show="showModal"
on-submit="uploadNewImage($image)">
</image-editor-modal>
After
Why use isolate scope?
● Encapsulation!
● Smaller components are easier to understand
● Easier to unit test
● This is how components work in Angular 2
controller as syntax
imageEditorModal
angular.module('imageShare').directive('imageEditorModal', function () {
return {
/*...*/
link: function (scope) {
scope. close = function () {
scope. show = false;
scope. url = '';
scope. description = '';
};
scope. submit = function () {
scope. onSubmit({$image: {/*...*/}});
scope. close();
};
}
};
});
imageEditorModal
angular.module('imageShare').directive('imageEditorModal', function () {
return {
/*...*/
controller: ImageEditorModalCtrl,
controllerAs: '$ctrl',
bindToController: true
};
});
function ImageEditorModalCtrl() { }
ImageEditorModalCtrl.prototype.close = function () {
this.show = false;
this.url = '';
this.description = '';
};
ImageEditorModalCtrl.prototype.submit = function () {
this.onSubmit({$image: {/*...*/}});
this.close();
};
imageEditorModal.html
<div ng-show="show">
<div class="modal-background" ng-click="cancel()"></div>
<div class="modal-content">
<form name="form" ng-submit="submit()">
<div class="form-group">
< label for="url">Image Url</label>
< input id="url" ng-model="url">
</div>
<div class="form-group">
< label for="description">Description</ label>
< textarea id="description" ng-model="description">
</ textarea>
</div>
<div class="pull-right"><!--...--></div>
</form>
</div>
</div>
imageEditorModal.html
<div ng-show="$ctrl.show">
<div class="modal-background" ng-click="$ctrl.cancel()"></div>
<div class="modal-content">
<form name="form" ng-submit="$ctrl.submit()">
<div class="form-group">
< label for="url">Image Url</label>
< input id="url" ng-model="$ctrl.url">
</div>
<div class="form-group">
< label for="description">Description</ label>
< textarea id="description" ng-model="$ctrl.description">
</ textarea>
</div>
<div class="pull-right"><!--...--></div>
</form>
</div>
</div>
Why use controllers over link?
● Removes redundant concept
● Let’s you use the “controller as” syntax
● Link functions don’t exist in Angular 2
Why use “controller as”?
● Don’t have to worry about scope inheritance
● Better organization
● Works well with ES6 classes
● This is how components work in Angular 2
Why use bindToController?
● Lets you use your controller for everything
● Don’t need to use $scope anymore, which
isn’t in Angular 2
● This is how components work in Angular 2
Why avoid $parent?
● Leads to brittle code
● Breaks encapsulation
● Makes unit testing hard
● Requires understanding scope inheritance
● It’s just the worst
● Can’t use it in Angular 2
.component()
imageList
angular.module('imageShare').controller('ImageListCtrl', ImageListCtrl);
function ImageListCtrl(api) {
var self = this;
this.api = api;
api.getImages().then(function (images) {
self.images = images;
});
}
ImageListCtrl.prototype.addImage = function () {
this.showModal = true;
};
ImageListCtrl.prototype.uploadNewImage = function (image) {
var self = this;
this.api.createImage(image).then(function (createdImage) {
self.images.unshift(createdImage);
});
};
imageList
angular.module('imageShare').component('imageList', {
templateUrl: 'src/components/imageList/imageList.html',
controller: ImageListComponent
});
function ImageListComponent(api) {
var self = this;
this.api = api;
api.getImages().then(function (images) {
self.images = images;
});
}
ImageListComponent.prototype.addImage = function () {
this.showModal = true;
};
ImageListComponent.prototype.uploadNewImage = function (image) {
var self = this;
this.api.createImage(image).then(function (createdImage) {
self.images.unshift(createdImage);
});
};
app.js
var app = angular.module('imageShare', ['ngRoute']);
app.config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/images', {
templateUrl: 'src/components/imageList/imageList.html',
controller: 'ImageListCtrl as $ctrl'
})
.otherwise({
redirectTo: '/images'
});
}]);
app.js
var app = angular.module('imageShare', ['ngRoute']);
app.config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/images', {
template: '<image-list></image-list>'
})
.otherwise({
redirectTo: '/images'
});
}]);
Why use .component()?
● Nicer syntax than .directive()
● Uses “controller as” by default
● Uses bindToController by default
● Consolidates many redundant concepts into
components. E.g. ng-controller, .
controller(), ng-include, router
controllers, router views, .directive()
● Very similar to components in Angular 2
TypeScript
imageEditorModal
function ImageEditorModalComponent() { }
ImageEditorModalComponent.prototype.close = function() { /*...*/ };
ImageEditorModalComponent.prototype.submit = function() { /*...*/ };
imageEditorModal
class ImageEditorModalComponent {
close() { /*...*/ }
submit() { /*...*/ }
}
.service()
apiService.ts
var IMAGES_URL = 'https://image-share.herokuapp.com/api/images';
angular.module('imageShare').factory('api', function ($http: ng.IHttpService) {
function getImages() {
return $http.get(IMAGES_URL).then((response) => {
return response.data;
});
}
function createImage(image) {
return $http.post(IMAGES_URL, image).then((response) => {
return response.data;
});
}
return {
getImages: getImages,
createImage: createImage
};
});
apiService.ts
var IMAGES_URL = 'https://image-share.herokuapp.com/api/images';
class ApiService {
constructor(private $http: ng.IHttpService) {
}
getImages(): ng.IPromise<Image[]> {
return this.$http.get(IMAGES_URL).then((response) => {
return response.data;
});
}
createImage(image): ng.IPromise<Image> {
return this.$http.post(IMAGES_URL, image).then((response) => {
return response.data;
});
}
}
angular.module('imageShare').service('api', ApiService);
Why use .service()?
● Works well with ES6 Classes
● Removes another redundant concept: .
factory()
● Angular 2 services are just ES6 classes
SystemJS
imageEditorModal
class ImageEditorModalComponent {
show: boolean = false;
url: string;
description: string;
onSubmit: (args: {$image: Image}) => void;
close() { /*...*/};
submit() {/*...*/};
}
angular.module('imageShare').component('imageEditorModal', {
templateUrl: 'src/components/imageEditorModal/imageEditorModal.html',
bindings: {
show: '=',
onSubmit: '&'
},
controller: ImageEditorModalComponent
});
imageEditorModal
class ImageEditorModalComponent {
show: boolean = false;
url: string;
description: string;
onSubmit: (args: {$image: Image}) => void;
close() { /*...*/};
submit() {/*...*/};
}
const imageEditorModalOptions = {
templateUrl: 'src/components/imageEditorModal/imageEditorModal.html',
bindings: {
show: '=',
onSubmit: '&'
},
controller: ImageEditorModalComponent
};
export {ImageEditorModalComponent, imageEditorModalOptions};
Why use SystemJS?
● Lets you use ES6 modules
● Angular 2 needs a module loader
Add ng-upgrade
index.html
<script src="/node_modules/es6-shim/es6-shim.js"></script>
<script src="/node_modules/systemjs/dist/system-polyfills.js"></script>
<script src="/node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
<script src="/node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="/node_modules/rxjs/bundles/Rx.js"></script>
<script src="/node_modules/angular2/bundles/angular2.dev.js"></script>
<script src="/node_modules/angular2/bundles/http.dev.js"></script>
<script src="/node_modules/angular2/bundles/upgrade.dev.js"></script>
Add the following scripts
adapter.ts
import {UpgradeAdapter} from 'angular2/upgrade';
export let adapter = new UpgradeAdapter();
app.ts
import {adapter} from "../../adapter";
//...
adapter.bootstrap(document.documentElement , ['imageShare']);
gulpfile.js
var gulp = require('gulp');
var ts = require('gulp-typescript');
gulp.task('ts', function () {
return gulp.src([
'src/**/*.ts',
'typings/**/*.ts',
//Taken from https://github.com/angular/angular/issues/7280
'node_modules/angular2/typings/browser.d.ts'
])
.pipe( ts({
target: 'ES5',
module: 'system',
emitDecoratorMetadata: true,
experimentalDecorators: true,
moduleResolution: 'node'
}))
.pipe( gulp.dest('src'));
});
Replace $http with Http
app.ts
import {adapter} from "../../adapter";
import {HTTP_PROVIDERS, Http} from "angular2/http";
import 'rxjs/add/operator/map';
adapter.addProvider(HTTP_PROVIDERS);
angular.module('imageShare', ['ngRoute'])
.factory('http', adapter.downgradeNg2Provider(Http));
apiService.ts
import {Http, Headers} from "angular2/http";
import {Observable} from "rxjs/Observable";
const IMAGES_URL = 'https://image-share.herokuapp.com/api/images';
export default class ApiService {
constructor(private http: Http) { }
getImages(): Observable<Image[]> {
return this.http.get(IMAGES_URL)
. map(res => res.json());
}
createImage(image): Observable<Image> {
var headers = new Headers();
headers.append('Content-Type', 'application/json');
return this.http.post(IMAGES_URL,JSON.stringify(image), { headers:
headers})
.map(res => res.json());
}
}
Calling getImages()
api.getImages().subscribe((images) => {
//Do something with images
});
Migrate ImageList to Angular 2
ImageListComponent.ts
import ApiService from "../../services/apiService";
class ImageListComponent {
//...
uploadNewImage (image) {
this.api.createImage(image).subscribe((createdImage) => {
this.images.unshift(createdImage);
});
};
}
const imageListOptions = {
templateUrl: 'src/components/imageList/imageList.html',
controller: ImageListComponent
};
export {ImageListComponent, imageListOptions}
ImageListComponent.ts
import ApiService from "../../services/apiService";
import {adapter} from "../../adapter";
import {Component} from "angular2/core";
@Component({
templateUrl: 'src/components/imageList/imageList.html',
selector: 'image-list',
directives: [adapter.upgradeNg1Component( 'imageEditorModal')]
})
export class ImageListComponent {
//...
uploadNewImage (event) {
this.api.createImage(event.$image).subscribe((createdImage) => {
this.images.unshift(createdImage);
});
};
}
ImageList.html
<div>
<div class="input-group">
<button class="btn btn-primary" (click)="addImage()">Add Image</button>
</div>
<ul class="list-group">
<li *ngFor="#image of images" class="list-group-item">
<div class="media">
< div class="media-left">
< img [src]="image.url">
</ div>
< div class="media-body">
{{image. description}}
</ div>
</div>
</li>
</ul>
</div>
<image-editor-modal
[(show)]="showModal"
(onSubmit)="uploadNewImage($event)">
</image-editor-modal>
app.ts
import {adapter} from "../../adapter";
import {ImageListComponent} from "../imageList/imageListComponent";
import ApiService from "../../services/apiService";
angular.module('imageShare', ['ngRoute'])
.directive('imageList', adapter.downgradeNg2Component(ImageListComponent));
adapter.upgradeNg1Provider( 'api', {asToken: ApiService});
Migrate Modal to Angular 2
imageEditorModal
class ImageEditorModalComponent {
//...
close() {
this.show = false;
this.url = '';
this.description = '';
};
}
const imageEditorModalOptions = {
templateUrl: 'src/components/imageEditorModal/imageEditorModal.html',
bindings: {
show: '=',
onSubmit: '&'
},
controller: ImageEditorModalComponent
};
export {ImageEditorModalComponent, imageEditorModalOptions};
imageEditorModal
import {Component, Input, Output, EventEmitter} from "angular2/core";
@Component({
templateUrl: 'src/components/imageEditorModal/imageEditorModal.html',
selector: 'image-editor-modal'
})
export class ImageEditorModalComponent {
url: string;
description: string;
@Input() show: boolean;
@Output() showChange = new EventEmitter();
@Output() onSubmit = new EventEmitter();
close() {
this.showChange.emit(false);
this.url = '';
this.description = '';
};
submit() {
this.onSubmit.emit({url: this.url, description: this.description});
this.close();
};
}
Migrate ApiService to Angular 2
ApiService.ts
import {Injectable} from "angular2/core";
const IMAGES_URL = 'https://image-share.herokuapp.com/api/images';
@Injectable()
export default class ApiService {
constructor(private http: Http) {
}
getImages(): Observable<Image[]> {
return this.http.get(IMAGES_URL)
. map(res => res.json());
}
createImage(image): Observable<Image> {
var headers = new Headers();
headers.append('Content-Type', 'application/json');
return this.http.post(IMAGES_URL,JSON.stringify(image), { headers:
headers})
. map(res => res.json());
}
App.ts
angular.module('imageShare', ['ngRoute'])
.service('api', ApiService)
.factory('http', adapter.downgradeNg2Provider(Http))
adapter.addProvider(ApiService);
Remove AngularJs 1
ApiService.ts
import {ROUTER_DIRECTIVES, RouteConfig, Route, ROUTER_PROVIDERS} from
"angular2/router";
import {Component} from "angular2/core";
import {bootstrap} from "angular2/platform/browser";
@Component({
selector: 'app',
template: '<router-outlet></router-outlet>',
directives: [ROUTER_DIRECTIVES]
})
@RouteConfig([
new Route({
path: '/home',
name: 'ImageList',
component: ImageListComponent,
useAsDefault: true
})
])
class App { }
bootstrap(App, [HTTP_PROVIDERS, ROUTER_PROVIDERS, ApiService]);
Summary
● Angular 2 is based on components and
services
● Incremental migration
● Angular 1 best practices
● Not all Angular 1 apps need to be upgraded
Rob McDiarmid
Slides: tinyurl.com/ng1-to-ng2
@robianmcd

More Related Content

What's hot

Migrating an Application from Angular 1 to Angular 2
Migrating an Application from Angular 1 to Angular 2 Migrating an Application from Angular 1 to Angular 2
Migrating an Application from Angular 1 to Angular 2
Ross Dederer
 
Angular 2... so can I use it now??
Angular 2... so can I use it now??Angular 2... so can I use it now??
Angular 2... so can I use it now??
Laurent Duveau
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
Naveen Pete
 
The productive developer guide to Angular 2
The productive developer guide to Angular 2The productive developer guide to Angular 2
The productive developer guide to Angular 2
Maurice De Beijer [MVP]
 
The evolution of Angular 2 @ AngularJS Munich Meetup #5
The evolution of Angular 2 @ AngularJS Munich Meetup #5The evolution of Angular 2 @ AngularJS Munich Meetup #5
The evolution of Angular 2 @ AngularJS Munich Meetup #5
Johannes Weber
 
Angular2 workshop
Angular2 workshopAngular2 workshop
Angular2 workshop
Nir Kaufman
 
Angular2
Angular2Angular2
Introduction to Angular2
Introduction to Angular2Introduction to Angular2
Introduction to Angular2
Ivan Matiishyn
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersIntroduction to Angular for .NET Developers
Introduction to Angular for .NET Developers
Laurent Duveau
 
Angular 2 - The Next Framework
Angular 2 - The Next FrameworkAngular 2 - The Next Framework
Angular 2 - The Next Framework
Commit University
 
Angular 2: What's New?
Angular 2: What's New?Angular 2: What's New?
Angular 2: What's New?
jbandi
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
Knoldus Inc.
 
Angular 2 - Better or worse
Angular 2 - Better or worseAngular 2 - Better or worse
Angular 2 - Better or worse
Vladimir Georgiev
 
Angular 1.x in action now
Angular 1.x in action nowAngular 1.x in action now
Angular 1.x in action now
GDG Odessa
 
Angular 2: core concepts
Angular 2: core conceptsAngular 2: core concepts
Angular 2: core concepts
Codemotion
 
Adventures with Angular 2
Adventures with Angular 2Adventures with Angular 2
Adventures with Angular 2
Dragos Ionita
 
Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency Injection
Nir Kaufman
 
Ng-Conf 2015 Report : AngularJS 1 & 2
Ng-Conf 2015 Report : AngularJS 1 & 2Ng-Conf 2015 Report : AngularJS 1 & 2
Ng-Conf 2015 Report : AngularJS 1 & 2
Nicolas PENNEC
 
Angular2 - In Action
Angular2  - In ActionAngular2  - In Action
Angular2 - In Action
Sebastian Pożoga
 
Building scalable modular app with Angular2 concept
Building scalable modular app with Angular2 conceptBuilding scalable modular app with Angular2 concept
Building scalable modular app with Angular2 concept
kzw
 

What's hot (20)

Migrating an Application from Angular 1 to Angular 2
Migrating an Application from Angular 1 to Angular 2 Migrating an Application from Angular 1 to Angular 2
Migrating an Application from Angular 1 to Angular 2
 
Angular 2... so can I use it now??
Angular 2... so can I use it now??Angular 2... so can I use it now??
Angular 2... so can I use it now??
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
The productive developer guide to Angular 2
The productive developer guide to Angular 2The productive developer guide to Angular 2
The productive developer guide to Angular 2
 
The evolution of Angular 2 @ AngularJS Munich Meetup #5
The evolution of Angular 2 @ AngularJS Munich Meetup #5The evolution of Angular 2 @ AngularJS Munich Meetup #5
The evolution of Angular 2 @ AngularJS Munich Meetup #5
 
Angular2 workshop
Angular2 workshopAngular2 workshop
Angular2 workshop
 
Angular2
Angular2Angular2
Angular2
 
Introduction to Angular2
Introduction to Angular2Introduction to Angular2
Introduction to Angular2
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersIntroduction to Angular for .NET Developers
Introduction to Angular for .NET Developers
 
Angular 2 - The Next Framework
Angular 2 - The Next FrameworkAngular 2 - The Next Framework
Angular 2 - The Next Framework
 
Angular 2: What's New?
Angular 2: What's New?Angular 2: What's New?
Angular 2: What's New?
 
Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
Angular 2 - Better or worse
Angular 2 - Better or worseAngular 2 - Better or worse
Angular 2 - Better or worse
 
Angular 1.x in action now
Angular 1.x in action nowAngular 1.x in action now
Angular 1.x in action now
 
Angular 2: core concepts
Angular 2: core conceptsAngular 2: core concepts
Angular 2: core concepts
 
Adventures with Angular 2
Adventures with Angular 2Adventures with Angular 2
Adventures with Angular 2
 
Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency Injection
 
Ng-Conf 2015 Report : AngularJS 1 & 2
Ng-Conf 2015 Report : AngularJS 1 & 2Ng-Conf 2015 Report : AngularJS 1 & 2
Ng-Conf 2015 Report : AngularJS 1 & 2
 
Angular2 - In Action
Angular2  - In ActionAngular2  - In Action
Angular2 - In Action
 
Building scalable modular app with Angular2 concept
Building scalable modular app with Angular2 conceptBuilding scalable modular app with Angular2 concept
Building scalable modular app with Angular2 concept
 

Viewers also liked

Application Migration - What, When, Why, How?
Application Migration - What, When, Why, How?Application Migration - What, When, Why, How?
Application Migration - What, When, Why, How?
Ajit Kumar
 
Good To Great Business Process Change That Works
Good To Great Business Process Change That WorksGood To Great Business Process Change That Works
Good To Great Business Process Change That Works
Jeffrey Barnes
 
The Power of Creativity and Innovation
The Power of Creativity and InnovationThe Power of Creativity and Innovation
The Power of Creativity and Innovation
Nexer Digital
 
Delivering business value through personalisation - Calum Haswell
Delivering business value through personalisation - Calum HaswellDelivering business value through personalisation - Calum Haswell
Delivering business value through personalisation - Calum Haswell
Intranet Now
 
Championing the user - John Scott
Championing the user - John ScottChampioning the user - John Scott
Championing the user - John Scott
Intranet Now
 
Managing Responsive Design Projects
Managing Responsive Design ProjectsManaging Responsive Design Projects
Managing Responsive Design Projects
FITC
 
Design that’s easy on the brain
Design that’s easy on the brainDesign that’s easy on the brain
Design that’s easy on the brain
FITC
 
Accumulations with Nicholas Felton
Accumulations with Nicholas FeltonAccumulations with Nicholas Felton
Accumulations with Nicholas Felton
FITC
 
Jedi Mind Trick: Networking, Selling and Pitching
Jedi Mind Trick: Networking, Selling and PitchingJedi Mind Trick: Networking, Selling and Pitching
Jedi Mind Trick: Networking, Selling and Pitching
FITC
 
Breaking The Broken Web
Breaking The Broken WebBreaking The Broken Web
Breaking The Broken Web
FITC
 
How to SURVIVE the Creative Industry
How to SURVIVE the Creative IndustryHow to SURVIVE the Creative Industry
How to SURVIVE the Creative Industry
FITC
 
From Box to Bots in Minutes
From Box to Bots in MinutesFrom Box to Bots in Minutes
From Box to Bots in Minutes
FITC
 
Untangle The Mess In Your Team’s Process
Untangle The Mess In Your Team’s ProcessUntangle The Mess In Your Team’s Process
Untangle The Mess In Your Team’s Process
FITC
 
Your UX is not my UX
Your UX is not my UXYour UX is not my UX
Your UX is not my UX
FITC
 
Beyond the Waterfall: Rethinking How We Work
Beyond the Waterfall: Rethinking How We WorkBeyond the Waterfall: Rethinking How We Work
Beyond the Waterfall: Rethinking How We Work
FITC
 
The Shifting Nature of FED Role
The Shifting Nature of FED RoleThe Shifting Nature of FED Role
The Shifting Nature of FED Role
FITC
 
The Little Shop of TDD Horrors
The Little Shop of TDD HorrorsThe Little Shop of TDD Horrors
The Little Shop of TDD Horrors
FITC
 
Unleashing the Power of 3D with WebJS
Unleashing the Power of 3D with WebJSUnleashing the Power of 3D with WebJS
Unleashing the Power of 3D with WebJS
FITC
 
Building Tools for the Next Web
Building Tools for the Next WebBuilding Tools for the Next Web
Building Tools for the Next Web
FITC
 
Reinvent Your Creative Process with Collaborative Hackathons
Reinvent Your Creative Process with Collaborative HackathonsReinvent Your Creative Process with Collaborative Hackathons
Reinvent Your Creative Process with Collaborative Hackathons
FITC
 

Viewers also liked (20)

Application Migration - What, When, Why, How?
Application Migration - What, When, Why, How?Application Migration - What, When, Why, How?
Application Migration - What, When, Why, How?
 
Good To Great Business Process Change That Works
Good To Great Business Process Change That WorksGood To Great Business Process Change That Works
Good To Great Business Process Change That Works
 
The Power of Creativity and Innovation
The Power of Creativity and InnovationThe Power of Creativity and Innovation
The Power of Creativity and Innovation
 
Delivering business value through personalisation - Calum Haswell
Delivering business value through personalisation - Calum HaswellDelivering business value through personalisation - Calum Haswell
Delivering business value through personalisation - Calum Haswell
 
Championing the user - John Scott
Championing the user - John ScottChampioning the user - John Scott
Championing the user - John Scott
 
Managing Responsive Design Projects
Managing Responsive Design ProjectsManaging Responsive Design Projects
Managing Responsive Design Projects
 
Design that’s easy on the brain
Design that’s easy on the brainDesign that’s easy on the brain
Design that’s easy on the brain
 
Accumulations with Nicholas Felton
Accumulations with Nicholas FeltonAccumulations with Nicholas Felton
Accumulations with Nicholas Felton
 
Jedi Mind Trick: Networking, Selling and Pitching
Jedi Mind Trick: Networking, Selling and PitchingJedi Mind Trick: Networking, Selling and Pitching
Jedi Mind Trick: Networking, Selling and Pitching
 
Breaking The Broken Web
Breaking The Broken WebBreaking The Broken Web
Breaking The Broken Web
 
How to SURVIVE the Creative Industry
How to SURVIVE the Creative IndustryHow to SURVIVE the Creative Industry
How to SURVIVE the Creative Industry
 
From Box to Bots in Minutes
From Box to Bots in MinutesFrom Box to Bots in Minutes
From Box to Bots in Minutes
 
Untangle The Mess In Your Team’s Process
Untangle The Mess In Your Team’s ProcessUntangle The Mess In Your Team’s Process
Untangle The Mess In Your Team’s Process
 
Your UX is not my UX
Your UX is not my UXYour UX is not my UX
Your UX is not my UX
 
Beyond the Waterfall: Rethinking How We Work
Beyond the Waterfall: Rethinking How We WorkBeyond the Waterfall: Rethinking How We Work
Beyond the Waterfall: Rethinking How We Work
 
The Shifting Nature of FED Role
The Shifting Nature of FED RoleThe Shifting Nature of FED Role
The Shifting Nature of FED Role
 
The Little Shop of TDD Horrors
The Little Shop of TDD HorrorsThe Little Shop of TDD Horrors
The Little Shop of TDD Horrors
 
Unleashing the Power of 3D with WebJS
Unleashing the Power of 3D with WebJSUnleashing the Power of 3D with WebJS
Unleashing the Power of 3D with WebJS
 
Building Tools for the Next Web
Building Tools for the Next WebBuilding Tools for the Next Web
Building Tools for the Next Web
 
Reinvent Your Creative Process with Collaborative Hackathons
Reinvent Your Creative Process with Collaborative HackathonsReinvent Your Creative Process with Collaborative Hackathons
Reinvent Your Creative Process with Collaborative Hackathons
 

Similar to Migrating to Angular 2

Angular the Good Parts
Angular the Good PartsAngular the Good Parts
Angular the Good Parts
Krzysztof Kula
 
Peggy angular 2 in meteor
Peggy   angular 2 in meteorPeggy   angular 2 in meteor
Peggy angular 2 in meteor
LearningTech
 
Sharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SFSharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SF
Pierre-Yves Ricau
 
Angular 2 - a New Hope
Angular 2 - a New HopeAngular 2 - a New Hope
Angular 2 - a New Hope
Sami Suo-Heikki
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
Omnia Helmi
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS Architecture
Eyal Vardi
 
AngularJS Internal
AngularJS InternalAngularJS Internal
AngularJS Internal
Eyal Vardi
 
Webgl para JavaScripters
Webgl para JavaScriptersWebgl para JavaScripters
Webgl para JavaScriptersgerbille
 
Angular1x and Angular 2 for Beginners
Angular1x and Angular 2 for BeginnersAngular1x and Angular 2 for Beginners
Angular1x and Angular 2 for Beginners
Oswald Campesato
 
AngularJS for Java Developers
AngularJS for Java DevelopersAngularJS for Java Developers
AngularJS for Java Developers
Loc Nguyen
 
Opinionated AngularJS
Opinionated AngularJSOpinionated AngularJS
Opinionated AngularJS
prabhutech
 
Integrating Angular js & three.js
Integrating Angular js & three.jsIntegrating Angular js & three.js
Integrating Angular js & three.js
Josh Staples
 
Explaination of angular
Explaination of angularExplaination of angular
Explaination of angular
Kan-Han (John) Lu
 
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Frost
 
Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6
William Marques
 
Ultimate Introduction To AngularJS
Ultimate Introduction To AngularJSUltimate Introduction To AngularJS
Ultimate Introduction To AngularJS
Jacopo Nardiello
 
Introduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress DevelopersIntroduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress Developers
Caldera Labs
 
Commit University - Exploring Angular 2
Commit University - Exploring Angular 2Commit University - Exploring Angular 2
Commit University - Exploring Angular 2
Commit University
 
Zukunftssichere Anwendungen mit AngularJS 1.x entwickeln (GDG DevFest Karlsru...
Zukunftssichere Anwendungen mit AngularJS 1.x entwickeln (GDG DevFest Karlsru...Zukunftssichere Anwendungen mit AngularJS 1.x entwickeln (GDG DevFest Karlsru...
Zukunftssichere Anwendungen mit AngularJS 1.x entwickeln (GDG DevFest Karlsru...
Christian Janz
 

Similar to Migrating to Angular 2 (20)

Angular the Good Parts
Angular the Good PartsAngular the Good Parts
Angular the Good Parts
 
Peggy angular 2 in meteor
Peggy   angular 2 in meteorPeggy   angular 2 in meteor
Peggy angular 2 in meteor
 
Sharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SFSharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SF
 
Angular 2 - a New Hope
Angular 2 - a New HopeAngular 2 - a New Hope
Angular 2 - a New Hope
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS Architecture
 
AngularJS Internal
AngularJS InternalAngularJS Internal
AngularJS Internal
 
Webgl para JavaScripters
Webgl para JavaScriptersWebgl para JavaScripters
Webgl para JavaScripters
 
Angular1x and Angular 2 for Beginners
Angular1x and Angular 2 for BeginnersAngular1x and Angular 2 for Beginners
Angular1x and Angular 2 for Beginners
 
AngularJS for Java Developers
AngularJS for Java DevelopersAngularJS for Java Developers
AngularJS for Java Developers
 
Opinionated AngularJS
Opinionated AngularJSOpinionated AngularJS
Opinionated AngularJS
 
Integrating Angular js & three.js
Integrating Angular js & three.jsIntegrating Angular js & three.js
Integrating Angular js & three.js
 
Explaination of angular
Explaination of angularExplaination of angular
Explaination of angular
 
Angular js
Angular jsAngular js
Angular js
 
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
Building an angular application -1 ( API: Golang, Database: Postgres) v1.0
 
Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6
 
Ultimate Introduction To AngularJS
Ultimate Introduction To AngularJSUltimate Introduction To AngularJS
Ultimate Introduction To AngularJS
 
Introduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress DevelopersIntroduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress Developers
 
Commit University - Exploring Angular 2
Commit University - Exploring Angular 2Commit University - Exploring Angular 2
Commit University - Exploring Angular 2
 
Zukunftssichere Anwendungen mit AngularJS 1.x entwickeln (GDG DevFest Karlsru...
Zukunftssichere Anwendungen mit AngularJS 1.x entwickeln (GDG DevFest Karlsru...Zukunftssichere Anwendungen mit AngularJS 1.x entwickeln (GDG DevFest Karlsru...
Zukunftssichere Anwendungen mit AngularJS 1.x entwickeln (GDG DevFest Karlsru...
 

More from FITC

Cut it up
Cut it upCut it up
Cut it up
FITC
 
Designing for Digital Health
Designing for Digital HealthDesigning for Digital Health
Designing for Digital Health
FITC
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript Performance
FITC
 
Surviving Your Tech Stack
Surviving Your Tech StackSurviving Your Tech Stack
Surviving Your Tech Stack
FITC
 
How to Pitch Your First AR Project
How to Pitch Your First AR ProjectHow to Pitch Your First AR Project
How to Pitch Your First AR Project
FITC
 
Start by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerStart by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the Answer
FITC
 
Cocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryCocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s Story
FITC
 
Everyday Innovation
Everyday InnovationEveryday Innovation
Everyday Innovation
FITC
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight Websites
FITC
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is Terrifying
FITC
 
Post-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanPost-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future Human
FITC
 
The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)
FITC
 
East of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameEast of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR Game
FITC
 
Creating a Proactive Healthcare System
Creating a Proactive Healthcare SystemCreating a Proactive Healthcare System
Creating a Proactive Healthcare System
FITC
 
World Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignWorld Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product Design
FITC
 
The Power of Now
The Power of NowThe Power of Now
The Power of Now
FITC
 
High Performance PWAs
High Performance PWAsHigh Performance PWAs
High Performance PWAs
FITC
 
Rise of the JAMstack
Rise of the JAMstackRise of the JAMstack
Rise of the JAMstack
FITC
 
From Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFrom Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self Discovery
FITC
 
Projects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForProjects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time For
FITC
 

More from FITC (20)

Cut it up
Cut it upCut it up
Cut it up
 
Designing for Digital Health
Designing for Digital HealthDesigning for Digital Health
Designing for Digital Health
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript Performance
 
Surviving Your Tech Stack
Surviving Your Tech StackSurviving Your Tech Stack
Surviving Your Tech Stack
 
How to Pitch Your First AR Project
How to Pitch Your First AR ProjectHow to Pitch Your First AR Project
How to Pitch Your First AR Project
 
Start by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the AnswerStart by Understanding the Problem, Not by Delivering the Answer
Start by Understanding the Problem, Not by Delivering the Answer
 
Cocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s StoryCocaine to Carrots: The Art of Telling Someone Else’s Story
Cocaine to Carrots: The Art of Telling Someone Else’s Story
 
Everyday Innovation
Everyday InnovationEveryday Innovation
Everyday Innovation
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight Websites
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is Terrifying
 
Post-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future HumanPost-Earth Visions: Designing for Space and the Future Human
Post-Earth Visions: Designing for Space and the Future Human
 
The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)The Rise of the Creative Social Influencer (and How to Become One)
The Rise of the Creative Social Influencer (and How to Become One)
 
East of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR GameEast of the Rockies: Developing an AR Game
East of the Rockies: Developing an AR Game
 
Creating a Proactive Healthcare System
Creating a Proactive Healthcare SystemCreating a Proactive Healthcare System
Creating a Proactive Healthcare System
 
World Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product DesignWorld Transformation: The Secret Agenda of Product Design
World Transformation: The Secret Agenda of Product Design
 
The Power of Now
The Power of NowThe Power of Now
The Power of Now
 
High Performance PWAs
High Performance PWAsHigh Performance PWAs
High Performance PWAs
 
Rise of the JAMstack
Rise of the JAMstackRise of the JAMstack
Rise of the JAMstack
 
From Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self DiscoveryFrom Closed to Open: A Journey of Self Discovery
From Closed to Open: A Journey of Self Discovery
 
Projects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time ForProjects Ain’t Nobody Got Time For
Projects Ain’t Nobody Got Time For
 

Recently uploaded

一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
keoku
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Brad Spiegel Macon GA
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
3ipehhoa
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
ufdana
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
Danica Gill
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
Gal Baras
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
GTProductions1
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
JeyaPerumal1
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
SEO Article Boost
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
Trish Parr
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
Rogerio Filho
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
Arif0071
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Florence Consulting
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
3ipehhoa
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
cuobya
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
harveenkaur52
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
3ipehhoa
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
eutxy
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
zoowe
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
CIOWomenMagazine
 

Recently uploaded (20)

一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
一比一原版(SLU毕业证)圣路易斯大学毕业证成绩单专业办理
 
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptx
 
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
急速办(bedfordhire毕业证书)英国贝德福特大学毕业证成绩单原版一模一样
 
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
一比一原版(CSU毕业证)加利福尼亚州立大学毕业证成绩单专业办理
 
7 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 20247 Best Cloud Hosting Services to Try Out in 2024
7 Best Cloud Hosting Services to Try Out in 2024
 
How to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptxHow to Use Contact Form 7 Like a Pro.pptx
How to Use Contact Form 7 Like a Pro.pptx
 
Comptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guideComptia N+ Standard Networking lesson guide
Comptia N+ Standard Networking lesson guide
 
1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...1.Wireless Communication System_Wireless communication is a broad term that i...
1.Wireless Communication System_Wireless communication is a broad term that i...
 
Understanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdfUnderstanding User Behavior with Google Analytics.pdf
Understanding User Behavior with Google Analytics.pdf
 
Search Result Showing My Post is Now Buried
Search Result Showing My Post is Now BuriedSearch Result Showing My Post is Now Buried
Search Result Showing My Post is Now Buried
 
guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...guildmasters guide to ravnica Dungeons & Dragons 5...
guildmasters guide to ravnica Dungeons & Dragons 5...
 
test test test test testtest test testtest test testtest test testtest test ...
test test  test test testtest test testtest test testtest test testtest test ...test test  test test testtest test testtest test testtest test testtest test ...
test test test test testtest test testtest test testtest test testtest test ...
 
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdfMeet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
Meet up Milano 14 _ Axpo Italia_ Migration from Mule3 (On-prem) to.pdf
 
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
原版仿制(uob毕业证书)英国伯明翰大学毕业证本科学历证书原版一模一样
 
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
假文凭国外(Adelaide毕业证)澳大利亚国立大学毕业证成绩单办理
 
Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027Italy Agriculture Equipment Market Outlook to 2027
Italy Agriculture Equipment Market Outlook to 2027
 
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
1比1复刻(bath毕业证书)英国巴斯大学毕业证学位证原版一模一样
 
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
一比一原版(LBS毕业证)伦敦商学院毕业证成绩单专业办理
 
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
国外证书(Lincoln毕业证)新西兰林肯大学毕业证成绩单不能毕业办理
 
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
Internet of Things in Manufacturing: Revolutionizing Efficiency & Quality | C...
 

Migrating to Angular 2

  • 2. Why use Angular 2 ● Takes advantage of modern web standards ○ ES6 ○ TypeScript ○ Web Components ○ Observables ○ Module Loaders ○ ZoneJS ● Removes many unnecessary concepts from Angular 1 ● Performance
  • 3. What is ng-upgrade? ● Lets you run angular 1 and 2 in the same app ● Use Angular 1 service in Angular 2 ● Use Angular 1 component in Angular 2 ● Use Angular 2 service in Angular 1 ● Use Angular 2 component in Angular 1
  • 4. Preparation Overview ● $watch ● Isolate scope ● Controller as ● $parent ● .component() ● TypeScript ● .service() ● SystemJS
  • 6. Format date with: $watch <body ng-app="myApp" ng-controller= "MainCtrl as ctrl"> Date: <input type="text" ng-model="ctrl.rawDate"> <div>Formatted Date: {{ ctrl.dateStr}}</div> </body> function MainCtrl($scope) { var self = this; $scope.$watch('ctrl.rawDate', function(newVal) { if (newVal !== undefined) { self.dateStr = moment(self.rawDate).format('MMM DD YYYY'); } }); } Plunker
  • 7. Format date with: ng-change <body ng-app="myApp" ng-controller= "MainCtrl as ctrl"> <h1>Date Formatter</ h1> Date: <input type="text" ng-model="ctrl.rawDate" ng-change="ctrl.onChange()"> <div>Formatted Date: {{ ctrl.dateStr}}</div> </body> function MainCtrl() { } MainCtrl.prototype.onChange = function() { this.dateStr = moment(this.rawDate).format('MMM DD YYYY'); }; Plunker
  • 8. Format date with: getterSetter <body ng-app="myApp" ng-controller= "MainCtrl as ctrl"> <h1>Date Formatter</ h1> Date: <input type="text" ng-model="ctrl.rawDate" ng-model-options= "{ getterSetter: true }"> <div>Formatted Date: {{ ctrl.dateStr}}</div> </body> function MainCtrl() { } MainCtrl.prototype.rawDate = function(rawDate) { if (rawDate !== undefined) { this._rawDate = rawDate; this.dateStr = moment(rawDate). format('MMM DD YYYY'); } else { return this._rawDate; } }; Plunker
  • 9. Format date with: function <body ng-app="myApp" ng-controller= "MainCtrl as ctrl"> <h1>Date Formatter</ h1> Date: <input type="text" ng-model="ctrl.rawDate"> <div>Formatted Date: {{ ctrl.getDateStr()}}</div> </body> function MainCtrl() { } MainCtrl.prototype.getDateStr = function() { if (this.rawDate !== undefined) { return moment(this.rawDate).format('MMM DD YYYY'); } }; Plunker
  • 11. Why avoid $watch? ● Hard to reason about ● Not declarative ● Creates unnecessary watcher ● Not in Angular 2
  • 13. angular.module('imageShare').directive('imageEditorModal', function () { return { restrict: 'E', templateUrl: 'src/components/imageEditorModal/imageEditorModal.html', link: function(scope) { scope. close = function () { scope. showModal = false; scope. url = ''; scope. description = ''; }; scope. submit = function() { scope. uploadNewImage ({/*...*/}); scope. close(); }; } }; }); imageEditorModal
  • 14. angular.module('imageShare').directive('imageEditorModal', function () { return { restrict: 'E', templateUrl: 'src/components/imageEditorModal/imageEditorModal.html', scope: {}, link: function(scope) { scope. close = function () { scope .$parent.showModal = false; scope. url = ''; scope. description = ''; }; scope. submit = function() { scope .$parent.uploadNewImage({ /*...*/}); scope. close(); }; } }; }); imageEditorModal
  • 15. angular.module('imageShare').directive('imageEditorModal', function () { return { restrict: 'E', templateUrl: 'src/components/imageEditorModal/imageEditorModal.html', scope: { show: '=', onSubmit: '&' }, link: function(scope) { scope. close = function () { scope. show = false; scope. url = ''; scope. description = ''; }; scope. submit = function() { scope. onSubmit({$image: {/*...*/}}); scope. close(); }; } }; imageEditorModal
  • 17. Why use isolate scope? ● Encapsulation! ● Smaller components are easier to understand ● Easier to unit test ● This is how components work in Angular 2
  • 19. imageEditorModal angular.module('imageShare').directive('imageEditorModal', function () { return { /*...*/ link: function (scope) { scope. close = function () { scope. show = false; scope. url = ''; scope. description = ''; }; scope. submit = function () { scope. onSubmit({$image: {/*...*/}}); scope. close(); }; } }; });
  • 20. imageEditorModal angular.module('imageShare').directive('imageEditorModal', function () { return { /*...*/ controller: ImageEditorModalCtrl, controllerAs: '$ctrl', bindToController: true }; }); function ImageEditorModalCtrl() { } ImageEditorModalCtrl.prototype.close = function () { this.show = false; this.url = ''; this.description = ''; }; ImageEditorModalCtrl.prototype.submit = function () { this.onSubmit({$image: {/*...*/}}); this.close(); };
  • 21. imageEditorModal.html <div ng-show="show"> <div class="modal-background" ng-click="cancel()"></div> <div class="modal-content"> <form name="form" ng-submit="submit()"> <div class="form-group"> < label for="url">Image Url</label> < input id="url" ng-model="url"> </div> <div class="form-group"> < label for="description">Description</ label> < textarea id="description" ng-model="description"> </ textarea> </div> <div class="pull-right"><!--...--></div> </form> </div> </div>
  • 22. imageEditorModal.html <div ng-show="$ctrl.show"> <div class="modal-background" ng-click="$ctrl.cancel()"></div> <div class="modal-content"> <form name="form" ng-submit="$ctrl.submit()"> <div class="form-group"> < label for="url">Image Url</label> < input id="url" ng-model="$ctrl.url"> </div> <div class="form-group"> < label for="description">Description</ label> < textarea id="description" ng-model="$ctrl.description"> </ textarea> </div> <div class="pull-right"><!--...--></div> </form> </div> </div>
  • 23. Why use controllers over link? ● Removes redundant concept ● Let’s you use the “controller as” syntax ● Link functions don’t exist in Angular 2
  • 24. Why use “controller as”? ● Don’t have to worry about scope inheritance ● Better organization ● Works well with ES6 classes ● This is how components work in Angular 2
  • 25. Why use bindToController? ● Lets you use your controller for everything ● Don’t need to use $scope anymore, which isn’t in Angular 2 ● This is how components work in Angular 2
  • 26. Why avoid $parent? ● Leads to brittle code ● Breaks encapsulation ● Makes unit testing hard ● Requires understanding scope inheritance ● It’s just the worst ● Can’t use it in Angular 2
  • 28. imageList angular.module('imageShare').controller('ImageListCtrl', ImageListCtrl); function ImageListCtrl(api) { var self = this; this.api = api; api.getImages().then(function (images) { self.images = images; }); } ImageListCtrl.prototype.addImage = function () { this.showModal = true; }; ImageListCtrl.prototype.uploadNewImage = function (image) { var self = this; this.api.createImage(image).then(function (createdImage) { self.images.unshift(createdImage); }); };
  • 29. imageList angular.module('imageShare').component('imageList', { templateUrl: 'src/components/imageList/imageList.html', controller: ImageListComponent }); function ImageListComponent(api) { var self = this; this.api = api; api.getImages().then(function (images) { self.images = images; }); } ImageListComponent.prototype.addImage = function () { this.showModal = true; }; ImageListComponent.prototype.uploadNewImage = function (image) { var self = this; this.api.createImage(image).then(function (createdImage) { self.images.unshift(createdImage); }); };
  • 30. app.js var app = angular.module('imageShare', ['ngRoute']); app.config(['$routeProvider', function ($routeProvider) { $routeProvider .when('/images', { templateUrl: 'src/components/imageList/imageList.html', controller: 'ImageListCtrl as $ctrl' }) .otherwise({ redirectTo: '/images' }); }]);
  • 31. app.js var app = angular.module('imageShare', ['ngRoute']); app.config(['$routeProvider', function ($routeProvider) { $routeProvider .when('/images', { template: '<image-list></image-list>' }) .otherwise({ redirectTo: '/images' }); }]);
  • 32. Why use .component()? ● Nicer syntax than .directive() ● Uses “controller as” by default ● Uses bindToController by default ● Consolidates many redundant concepts into components. E.g. ng-controller, . controller(), ng-include, router controllers, router views, .directive() ● Very similar to components in Angular 2
  • 34. imageEditorModal function ImageEditorModalComponent() { } ImageEditorModalComponent.prototype.close = function() { /*...*/ }; ImageEditorModalComponent.prototype.submit = function() { /*...*/ };
  • 37. apiService.ts var IMAGES_URL = 'https://image-share.herokuapp.com/api/images'; angular.module('imageShare').factory('api', function ($http: ng.IHttpService) { function getImages() { return $http.get(IMAGES_URL).then((response) => { return response.data; }); } function createImage(image) { return $http.post(IMAGES_URL, image).then((response) => { return response.data; }); } return { getImages: getImages, createImage: createImage }; });
  • 38. apiService.ts var IMAGES_URL = 'https://image-share.herokuapp.com/api/images'; class ApiService { constructor(private $http: ng.IHttpService) { } getImages(): ng.IPromise<Image[]> { return this.$http.get(IMAGES_URL).then((response) => { return response.data; }); } createImage(image): ng.IPromise<Image> { return this.$http.post(IMAGES_URL, image).then((response) => { return response.data; }); } } angular.module('imageShare').service('api', ApiService);
  • 39. Why use .service()? ● Works well with ES6 Classes ● Removes another redundant concept: . factory() ● Angular 2 services are just ES6 classes
  • 41. imageEditorModal class ImageEditorModalComponent { show: boolean = false; url: string; description: string; onSubmit: (args: {$image: Image}) => void; close() { /*...*/}; submit() {/*...*/}; } angular.module('imageShare').component('imageEditorModal', { templateUrl: 'src/components/imageEditorModal/imageEditorModal.html', bindings: { show: '=', onSubmit: '&' }, controller: ImageEditorModalComponent });
  • 42. imageEditorModal class ImageEditorModalComponent { show: boolean = false; url: string; description: string; onSubmit: (args: {$image: Image}) => void; close() { /*...*/}; submit() {/*...*/}; } const imageEditorModalOptions = { templateUrl: 'src/components/imageEditorModal/imageEditorModal.html', bindings: { show: '=', onSubmit: '&' }, controller: ImageEditorModalComponent }; export {ImageEditorModalComponent, imageEditorModalOptions};
  • 43. Why use SystemJS? ● Lets you use ES6 modules ● Angular 2 needs a module loader
  • 45. index.html <script src="/node_modules/es6-shim/es6-shim.js"></script> <script src="/node_modules/systemjs/dist/system-polyfills.js"></script> <script src="/node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script> <script src="/node_modules/angular2/bundles/angular2-polyfills.js"></script> <script src="/node_modules/rxjs/bundles/Rx.js"></script> <script src="/node_modules/angular2/bundles/angular2.dev.js"></script> <script src="/node_modules/angular2/bundles/http.dev.js"></script> <script src="/node_modules/angular2/bundles/upgrade.dev.js"></script> Add the following scripts
  • 46. adapter.ts import {UpgradeAdapter} from 'angular2/upgrade'; export let adapter = new UpgradeAdapter();
  • 47. app.ts import {adapter} from "../../adapter"; //... adapter.bootstrap(document.documentElement , ['imageShare']);
  • 48. gulpfile.js var gulp = require('gulp'); var ts = require('gulp-typescript'); gulp.task('ts', function () { return gulp.src([ 'src/**/*.ts', 'typings/**/*.ts', //Taken from https://github.com/angular/angular/issues/7280 'node_modules/angular2/typings/browser.d.ts' ]) .pipe( ts({ target: 'ES5', module: 'system', emitDecoratorMetadata: true, experimentalDecorators: true, moduleResolution: 'node' })) .pipe( gulp.dest('src')); });
  • 50.
  • 51.
  • 52. app.ts import {adapter} from "../../adapter"; import {HTTP_PROVIDERS, Http} from "angular2/http"; import 'rxjs/add/operator/map'; adapter.addProvider(HTTP_PROVIDERS); angular.module('imageShare', ['ngRoute']) .factory('http', adapter.downgradeNg2Provider(Http));
  • 53. apiService.ts import {Http, Headers} from "angular2/http"; import {Observable} from "rxjs/Observable"; const IMAGES_URL = 'https://image-share.herokuapp.com/api/images'; export default class ApiService { constructor(private http: Http) { } getImages(): Observable<Image[]> { return this.http.get(IMAGES_URL) . map(res => res.json()); } createImage(image): Observable<Image> { var headers = new Headers(); headers.append('Content-Type', 'application/json'); return this.http.post(IMAGES_URL,JSON.stringify(image), { headers: headers}) .map(res => res.json()); } }
  • 55. Migrate ImageList to Angular 2
  • 56.
  • 57.
  • 58. ImageListComponent.ts import ApiService from "../../services/apiService"; class ImageListComponent { //... uploadNewImage (image) { this.api.createImage(image).subscribe((createdImage) => { this.images.unshift(createdImage); }); }; } const imageListOptions = { templateUrl: 'src/components/imageList/imageList.html', controller: ImageListComponent }; export {ImageListComponent, imageListOptions}
  • 59. ImageListComponent.ts import ApiService from "../../services/apiService"; import {adapter} from "../../adapter"; import {Component} from "angular2/core"; @Component({ templateUrl: 'src/components/imageList/imageList.html', selector: 'image-list', directives: [adapter.upgradeNg1Component( 'imageEditorModal')] }) export class ImageListComponent { //... uploadNewImage (event) { this.api.createImage(event.$image).subscribe((createdImage) => { this.images.unshift(createdImage); }); }; }
  • 60. ImageList.html <div> <div class="input-group"> <button class="btn btn-primary" (click)="addImage()">Add Image</button> </div> <ul class="list-group"> <li *ngFor="#image of images" class="list-group-item"> <div class="media"> < div class="media-left"> < img [src]="image.url"> </ div> < div class="media-body"> {{image. description}} </ div> </div> </li> </ul> </div> <image-editor-modal [(show)]="showModal" (onSubmit)="uploadNewImage($event)"> </image-editor-modal>
  • 61. app.ts import {adapter} from "../../adapter"; import {ImageListComponent} from "../imageList/imageListComponent"; import ApiService from "../../services/apiService"; angular.module('imageShare', ['ngRoute']) .directive('imageList', adapter.downgradeNg2Component(ImageListComponent)); adapter.upgradeNg1Provider( 'api', {asToken: ApiService});
  • 62. Migrate Modal to Angular 2
  • 63.
  • 64.
  • 65. imageEditorModal class ImageEditorModalComponent { //... close() { this.show = false; this.url = ''; this.description = ''; }; } const imageEditorModalOptions = { templateUrl: 'src/components/imageEditorModal/imageEditorModal.html', bindings: { show: '=', onSubmit: '&' }, controller: ImageEditorModalComponent }; export {ImageEditorModalComponent, imageEditorModalOptions};
  • 66. imageEditorModal import {Component, Input, Output, EventEmitter} from "angular2/core"; @Component({ templateUrl: 'src/components/imageEditorModal/imageEditorModal.html', selector: 'image-editor-modal' }) export class ImageEditorModalComponent { url: string; description: string; @Input() show: boolean; @Output() showChange = new EventEmitter(); @Output() onSubmit = new EventEmitter(); close() { this.showChange.emit(false); this.url = ''; this.description = ''; }; submit() { this.onSubmit.emit({url: this.url, description: this.description}); this.close(); }; }
  • 68.
  • 69.
  • 70. ApiService.ts import {Injectable} from "angular2/core"; const IMAGES_URL = 'https://image-share.herokuapp.com/api/images'; @Injectable() export default class ApiService { constructor(private http: Http) { } getImages(): Observable<Image[]> { return this.http.get(IMAGES_URL) . map(res => res.json()); } createImage(image): Observable<Image> { var headers = new Headers(); headers.append('Content-Type', 'application/json'); return this.http.post(IMAGES_URL,JSON.stringify(image), { headers: headers}) . map(res => res.json()); }
  • 71. App.ts angular.module('imageShare', ['ngRoute']) .service('api', ApiService) .factory('http', adapter.downgradeNg2Provider(Http)) adapter.addProvider(ApiService);
  • 73.
  • 74.
  • 75. ApiService.ts import {ROUTER_DIRECTIVES, RouteConfig, Route, ROUTER_PROVIDERS} from "angular2/router"; import {Component} from "angular2/core"; import {bootstrap} from "angular2/platform/browser"; @Component({ selector: 'app', template: '<router-outlet></router-outlet>', directives: [ROUTER_DIRECTIVES] }) @RouteConfig([ new Route({ path: '/home', name: 'ImageList', component: ImageListComponent, useAsDefault: true }) ]) class App { } bootstrap(App, [HTTP_PROVIDERS, ROUTER_PROVIDERS, ApiService]);
  • 76. Summary ● Angular 2 is based on components and services ● Incremental migration ● Angular 1 best practices ● Not all Angular 1 apps need to be upgraded