SlideShare une entreprise Scribd logo
1  sur  77
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

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 2Naveen 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 2Maurice 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 #5Johannes Weber
 
Angular2 workshop
Angular2 workshopAngular2 workshop
Angular2 workshopNir Kaufman
 
Introduction to Angular2
Introduction to Angular2Introduction to Angular2
Introduction to Angular2Ivan Matiishyn
 
Introduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersIntroduction to Angular for .NET Developers
Introduction to Angular for .NET DevelopersLaurent Duveau
 
Angular 2 - The Next Framework
Angular 2 - The Next FrameworkAngular 2 - The Next Framework
Angular 2 - The Next FrameworkCommit 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 2Knoldus Inc.
 
Angular 1.x in action now
Angular 1.x in action nowAngular 1.x in action now
Angular 1.x in action nowGDG Odessa
 
Angular 2: core concepts
Angular 2: core conceptsAngular 2: core concepts
Angular 2: core conceptsCodemotion
 
Adventures with Angular 2
Adventures with Angular 2Adventures with Angular 2
Adventures with Angular 2Dragos Ionita
 
Angular Dependency Injection
Angular Dependency InjectionAngular Dependency Injection
Angular Dependency InjectionNir 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 & 2Nicolas PENNEC
 
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 conceptkzw
 

Tendances (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
 

En vedette

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 WorksJeffrey Barnes
 
The Power of Creativity and Innovation
The Power of Creativity and InnovationThe Power of Creativity and Innovation
The Power of Creativity and InnovationNexer 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 HaswellIntranet Now
 
Championing the user - John Scott
Championing the user - John ScottChampioning the user - John Scott
Championing the user - John ScottIntranet Now
 
Managing Responsive Design Projects
Managing Responsive Design ProjectsManaging Responsive Design Projects
Managing Responsive Design ProjectsFITC
 
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 brainFITC
 
Accumulations with Nicholas Felton
Accumulations with Nicholas FeltonAccumulations with Nicholas Felton
Accumulations with Nicholas FeltonFITC
 
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 PitchingFITC
 
Breaking The Broken Web
Breaking The Broken WebBreaking The Broken Web
Breaking The Broken WebFITC
 
How to SURVIVE the Creative Industry
How to SURVIVE the Creative IndustryHow to SURVIVE the Creative Industry
How to SURVIVE the Creative IndustryFITC
 
From Box to Bots in Minutes
From Box to Bots in MinutesFrom Box to Bots in Minutes
From Box to Bots in MinutesFITC
 
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 ProcessFITC
 
Your UX is not my UX
Your UX is not my UXYour UX is not my UX
Your UX is not my UXFITC
 
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 WorkFITC
 
The Shifting Nature of FED Role
The Shifting Nature of FED RoleThe Shifting Nature of FED Role
The Shifting Nature of FED RoleFITC
 
The Little Shop of TDD Horrors
The Little Shop of TDD HorrorsThe Little Shop of TDD Horrors
The Little Shop of TDD HorrorsFITC
 
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 WebJSFITC
 
Building Tools for the Next Web
Building Tools for the Next WebBuilding Tools for the Next Web
Building Tools for the Next WebFITC
 
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 HackathonsFITC
 

En vedette (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
 

Similaire à Migrating to Angular 2

Angular the Good Parts
Angular the Good PartsAngular the Good Parts
Angular the Good PartsKrzysztof Kula
 
Peggy angular 2 in meteor
Peggy   angular 2 in meteorPeggy   angular 2 in meteor
Peggy angular 2 in meteorLearningTech
 
Sharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SFSharper Better Faster Dagger ‡ - Droidcon SF
Sharper Better Faster Dagger ‡ - Droidcon SFPierre-Yves Ricau
 
AngularJS Architecture
AngularJS ArchitectureAngularJS Architecture
AngularJS ArchitectureEyal Vardi
 
AngularJS Internal
AngularJS InternalAngularJS Internal
AngularJS InternalEyal 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 BeginnersOswald Campesato
 
AngularJS for Java Developers
AngularJS for Java DevelopersAngularJS for Java Developers
AngularJS for Java DevelopersLoc Nguyen
 
Opinionated AngularJS
Opinionated AngularJSOpinionated AngularJS
Opinionated AngularJSprabhutech
 
Integrating Angular js & three.js
Integrating Angular js & three.jsIntegrating Angular js & three.js
Integrating Angular js & three.jsJosh Staples
 
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.0Frost
 
Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6William Marques
 
Ultimate Introduction To AngularJS
Ultimate Introduction To AngularJSUltimate Introduction To AngularJS
Ultimate Introduction To AngularJSJacopo Nardiello
 
Introduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress DevelopersIntroduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress DevelopersCaldera Labs
 
Commit University - Exploring Angular 2
Commit University - Exploring Angular 2Commit University - Exploring Angular 2
Commit University - Exploring Angular 2Commit 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
 

Similaire à 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...
 

Plus de FITC

Cut it up
Cut it upCut it up
Cut it upFITC
 
Designing for Digital Health
Designing for Digital HealthDesigning for Digital Health
Designing for Digital HealthFITC
 
Profiling JavaScript Performance
Profiling JavaScript PerformanceProfiling JavaScript Performance
Profiling JavaScript PerformanceFITC
 
Surviving Your Tech Stack
Surviving Your Tech StackSurviving Your Tech Stack
Surviving Your Tech StackFITC
 
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 ProjectFITC
 
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 AnswerFITC
 
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 StoryFITC
 
Everyday Innovation
Everyday InnovationEveryday Innovation
Everyday InnovationFITC
 
HyperLight Websites
HyperLight WebsitesHyperLight Websites
HyperLight WebsitesFITC
 
Everything is Terrifying
Everything is TerrifyingEverything is Terrifying
Everything is TerrifyingFITC
 
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 HumanFITC
 
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 GameFITC
 
Creating a Proactive Healthcare System
Creating a Proactive Healthcare SystemCreating a Proactive Healthcare System
Creating a Proactive Healthcare SystemFITC
 
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 DesignFITC
 
The Power of Now
The Power of NowThe Power of Now
The Power of NowFITC
 
High Performance PWAs
High Performance PWAsHigh Performance PWAs
High Performance PWAsFITC
 
Rise of the JAMstack
Rise of the JAMstackRise of the JAMstack
Rise of the JAMstackFITC
 
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 DiscoveryFITC
 
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 ForFITC
 

Plus de 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
 

Dernier

Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...Escorts Call Girls
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Sheetaleventcompany
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...singhpriety023
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Delhi Call girls
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableSeo
 
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service OnlineCALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Onlineanilsa9823
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Standkumarajju5765
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...SofiyaSharma5
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 

Dernier (20)

Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...(+971568250507  ))#  Young Call Girls  in Ajman  By Pakistani Call Girls  in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
 
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
Call Girls Service Chandigarh Lucky ❤️ 7710465962 Independent Call Girls In C...
 
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting  High Prof...
VIP Model Call Girls Hadapsar ( Pune ) Call ON 9905417584 Starting High Prof...
 
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service OnlineCALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
CALL ON ➥8923113531 🔝Call Girls Lucknow Lucknow best sexual service Online
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night StandHot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
Hot Call Girls |Delhi |Hauz Khas ☎ 9711199171 Book Your One night Stand
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
 
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
@9999965857 🫦 Sexy Desi Call Girls Laxmi Nagar 💓 High Profile Escorts Delhi 🫶
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 

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