SlideShare a Scribd company logo
Getting to Angular 2
Jen Bourey, Google
@jbourey
How do we upgrade to Angular 2 without
Putting all development on hold?
Driving developers crazy?
Jen Bourey
• Tech Lead for the Google
Cloud Console’s client-side
infrastructure team
• Instigator of angular adoption
for Google Cloud Platform
• Veteran of multiple upgrades
Google Cloud Console
Getting to Angular 2
Getting to Angular 2
Project size
• ~450K JS + template source LOC
• Hundreds of reusable shared components and
services
• Dozens of teams across multiple offices, time
zones
• Release 2x / week
Angular 2
for Large Apps
Performance improvements
@tbosch1009
AoT Template Compilation
https://github.com/jeffbcross/closure-compiler-angular-bundling/tree/master/dist
Lazy-loading
• Built into ng2 router
• Automatically loads ng2 modules when needed
• Default implementation is systemjs
Getting to Angular 2
Getting to Angular 2
ngUpgrade
ngUpgrade
https://angular.io/docs/ts/latest/guide/upgrade.html
https://angular.io/docs/ts/latest/guide/upgrade.html
Page 1 (ng1)
Component (ng1)
Comp (downgraded ng2)
Service (downgraded ng2)
Service (ng1)
Application (ng1)
Page 2 (ng1)
Component (ng1)
Comp (downgraded ng2)
Service (downgraded ng2)
Service (ng1)
Page 1 (ng2)
Component (upgraded ng1)
Component (ng2)
Service (ng2)
Service (upgraded ng1)
Application (ng1)
Page 2 (ng2)
Component (upgraded ng1)
Component (ng2)
Service (ng2)
Service (upgraded ng1)
Page 1 (ng1)
Component (ng1)
Component (ng1)
Service (ng1)
Service (ng1)
Application (ng1)
Page 2 (ng2)
Component (ng2)
Component (ng2)
Service (ng1)
Service (ng2)
Parallel routing
<div class=“ng-view”>
<ng2-router-root>
(downgraded)
<router-outlet>
ng1 Page ng2 Page
Lazy loading
• path1 (/path1)
• subpath1 (/path1/subpath1)
• path2 (/path2)
• subpath1 (/path2/subpath1)
let ROUTES = [
{
path: ’path1’, component: Page1, children: [
{ path: ‘subpath1’, component: Page2 },
]
},
{
path: ’path2’, component: Page3, children: [
{ path: ‘subpath1’, component: Page4 },
]
},
...
]
@NgModule({imports:
[RouterModule.forRoot(ROUTES)]})
export class AppModule()
@NgModule({ imports: [
ChildModule,
RouterModule.forRoot([])
]})
export class AppModule {}
@NgModule({
imports: [RouterModule.forChild(CHILD_ROUTES}]
})
export class ChildModule {}
• path1 (/path1)
• subpath1 (/path1/subpath1)
• path2 (/path2)
• subpath2 (/path2/subpath2)
@NgModule({ imports: [
ChildModule,
RouterModule.forRoot([
{
path: ‘path1’,
loadChildren: () => ChildModule
}
])
]})
export class AppModule {}
@NgModule({
imports: [RouterModule.forChild(CHILD_ROUTES}]
})
export class ChildModule {}
• path1 (/path1)
• subpath1 (/path1/subpath1)
• subpath2 (/path1/subpath2)
• path2 (/path2)
Tips
ngUpgrade + lazy loading
https://angular.io/docs/ts/latest/guide/upgrade.html
Upgrading ng1 directives
$compile
Route events
RouteListeningService
doThing()
$routeChangeSuccess
ng-upgraded service
doThing()
Route events
RouteListeningService
doThing()
$routeChangeSuccess
ng-upgraded service
doThing()
ng2 route events
https://github.com/bourey/ngupgrade-example
@jbourey

More Related Content

PPTX
Helm at reddit: from local dev, staging, to production
PDF
Monitor Cloud Foundry and Bosh with Prometheus
PPTX
Continuous Delivery with Chef and GoCD
PPTX
Microsoft azure pipeline + Docker + Amazon s3 + Jekyll + github
PDF
Google App Engine Developer - Day1
PDF
Building a loosely coupled toolchain with Rundeck and Puppet
PDF
PWA with Kotlin
PPTX
Atlassian Bamboo Feature Overview
Helm at reddit: from local dev, staging, to production
Monitor Cloud Foundry and Bosh with Prometheus
Continuous Delivery with Chef and GoCD
Microsoft azure pipeline + Docker + Amazon s3 + Jekyll + github
Google App Engine Developer - Day1
Building a loosely coupled toolchain with Rundeck and Puppet
PWA with Kotlin
Atlassian Bamboo Feature Overview

What's hot (20)

PDF
Docker Best Practices in development and Production
PPTX
Hot deploy
PDF
Dev con pnp-engine-presentation
PPTX
Continuous integration using atlassian bamboo
PDF
20150511 Meteor Angular
PDF
Jenkins X intro (from google app dev conference)
PDF
Azure kubernetes service (aks) part 4 - Deploy multi-container app to AKS c...
PPTX
Eclipse loves-java script
PPTX
Going Serverless with Kubeless In Google Container Engine (GKE)
PDF
Mobile development with JBoss Tools
PPTX
Sppp presentation
PDF
CI CD with Docker and Kubernetes
PPTX
Is a ORCHESTRATION a new milestone?
PDF
How to share a Kubernetes cluster securely through Lens spaces
PDF
GoPro, Inc. Case study: Dive into the details of our web applications
PDF
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
PDF
How We Use GitHub
PPTX
Continuous integration using Bamboo
PPTX
DevOps best practices with OpenShift
PDF
Kubernetes at Reddit: An Origin Story - KubeCon NA 2018
Docker Best Practices in development and Production
Hot deploy
Dev con pnp-engine-presentation
Continuous integration using atlassian bamboo
20150511 Meteor Angular
Jenkins X intro (from google app dev conference)
Azure kubernetes service (aks) part 4 - Deploy multi-container app to AKS c...
Eclipse loves-java script
Going Serverless with Kubeless In Google Container Engine (GKE)
Mobile development with JBoss Tools
Sppp presentation
CI CD with Docker and Kubernetes
Is a ORCHESTRATION a new milestone?
How to share a Kubernetes cluster securely through Lens spaces
GoPro, Inc. Case study: Dive into the details of our web applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
How We Use GitHub
Continuous integration using Bamboo
DevOps best practices with OpenShift
Kubernetes at Reddit: An Origin Story - KubeCon NA 2018
Ad

Similar to Getting to Angular 2 (20)

PDF
Angular JS 2_0 BCS CTO_in_Res V3
PPTX
PPTX
Angular2 + Ng-Lightning + Lightning Design System = Great Apps
PPTX
Introduction to angular 2
PDF
Angular meetup 2 2019-08-29
PDF
KubeCon EU 2022 Istio, Flux & Flagger.pdf
PPTX
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
PDF
Browserify + Angular
PPT
Angular.ppt
PDF
5 Key Benefits of Migration
PDF
What's New in Angular 4 | Angular 4 Features | Angular 4 Changes | Angular Tu...
PDF
IVY: an overview
PPTX
Evolving Infrastructure
PPTX
Angular 2.0
PPTX
Gocd – Kubernetes/Nomad Continuous Deployment
PDF
Gitlab ci e kubernetes, build test and deploy your projects like a pro
PDF
Angular 2: core concepts
PDF
ngconf2015
PDF
Red Hat Forum Benelux 2015
PPTX
Angular
Angular JS 2_0 BCS CTO_in_Res V3
Angular2 + Ng-Lightning + Lightning Design System = Great Apps
Introduction to angular 2
Angular meetup 2 2019-08-29
KubeCon EU 2022 Istio, Flux & Flagger.pdf
GCP - Continuous Integration and Delivery into Kubernetes with GitHub, Travis...
Browserify + Angular
Angular.ppt
5 Key Benefits of Migration
What's New in Angular 4 | Angular 4 Features | Angular 4 Changes | Angular Tu...
IVY: an overview
Evolving Infrastructure
Angular 2.0
Gocd – Kubernetes/Nomad Continuous Deployment
Gitlab ci e kubernetes, build test and deploy your projects like a pro
Angular 2: core concepts
ngconf2015
Red Hat Forum Benelux 2015
Angular
Ad

More from Jennifer Bourey (8)

PDF
Migrating a 1M+ LOC project from AngularJS to Angular
PDF
Delivering Mobile Course Content with uMobile
PDF
uMobile: Jasig-Sakai 2012
PDF
uMobile Preconference Seminar
PDF
uMobile: Taking Mobile Applications and Devices to the Next Level
PDF
Sakai and uPortal 4
PDF
Rich Portlet Development in uPortal
PDF
uPortal 3.2 And Beyond
Migrating a 1M+ LOC project from AngularJS to Angular
Delivering Mobile Course Content with uMobile
uMobile: Jasig-Sakai 2012
uMobile Preconference Seminar
uMobile: Taking Mobile Applications and Devices to the Next Level
Sakai and uPortal 4
Rich Portlet Development in uPortal
uPortal 3.2 And Beyond

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Empathic Computing: Creating Shared Understanding
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Electronic commerce courselecture one. Pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Approach and Philosophy of On baking technology
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
Big Data Technologies - Introduction.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Chapter 3 Spatial Domain Image Processing.pdf
A Presentation on Artificial Intelligence
Empathic Computing: Creating Shared Understanding
Per capita expenditure prediction using model stacking based on satellite ima...
Electronic commerce courselecture one. Pdf
Assigned Numbers - 2025 - Bluetooth® Document
Programs and apps: productivity, graphics, security and other tools
Dropbox Q2 2025 Financial Results & Investor Presentation
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Unlocking AI with Model Context Protocol (MCP)
Diabetes mellitus diagnosis method based random forest with bat algorithm
Approach and Philosophy of On baking technology
Review of recent advances in non-invasive hemoglobin estimation
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Big Data Technologies - Introduction.pptx
20250228 LYD VKU AI Blended-Learning.pptx
A comparative analysis of optical character recognition models for extracting...

Getting to Angular 2