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
ELLIE29.pdfWETWETAWTAWETAETAETERTRTERTER
PDF
GDG Cloud Southlake #45: Patrick Debois: The Impact of GenAI on Development a...
PPTX
Blending method and technology for hydrogen.pptx
PDF
substrate PowerPoint Presentation basic one
PDF
“Introduction to Designing with AI Agents,” a Presentation from Amazon Web Se...
PPTX
Presentation - Principles of Instructional Design.pptx
PDF
Applying Agentic AI in Enterprise Automation
PDF
Uncertainty-aware contextual multi-armed bandits for recommendations in e-com...
PDF
FASHION-DRIVEN TEXTILES AS A CRYSTAL OF A NEW STREAM FOR STAKEHOLDER CAPITALI...
PDF
Revolutionizing recommendations a survey: a comprehensive exploration of mode...
PPT
Overviiew on Intellectual property right
PDF
1_Keynote_Breaking Barriers_한계를 넘어서_Charith Mendis.pdf
PPTX
From Curiosity to ROI — Cost-Benefit Analysis of Agentic Automation [3/6]
PDF
TicketRoot: Event Tech Solutions Deck 2025
PDF
The Digital Engine Room: Unlocking APAC’s Economic and Digital Potential thro...
PDF
Technical Debt in the AI Coding Era - By Antonio Bianco
PPTX
AQUEEL MUSHTAQUE FAKIH COMPUTER CENTER .
PPTX
Report in SIP_Distance_Learning_Technology_Impact.pptx
PDF
TrustArc Webinar - Data Minimization in Practice_ Reducing Risk, Enhancing Co...
PDF
Decision Optimization - From Theory to Practice
ELLIE29.pdfWETWETAWTAWETAETAETERTRTERTER
GDG Cloud Southlake #45: Patrick Debois: The Impact of GenAI on Development a...
Blending method and technology for hydrogen.pptx
substrate PowerPoint Presentation basic one
“Introduction to Designing with AI Agents,” a Presentation from Amazon Web Se...
Presentation - Principles of Instructional Design.pptx
Applying Agentic AI in Enterprise Automation
Uncertainty-aware contextual multi-armed bandits for recommendations in e-com...
FASHION-DRIVEN TEXTILES AS A CRYSTAL OF A NEW STREAM FOR STAKEHOLDER CAPITALI...
Revolutionizing recommendations a survey: a comprehensive exploration of mode...
Overviiew on Intellectual property right
1_Keynote_Breaking Barriers_한계를 넘어서_Charith Mendis.pdf
From Curiosity to ROI — Cost-Benefit Analysis of Agentic Automation [3/6]
TicketRoot: Event Tech Solutions Deck 2025
The Digital Engine Room: Unlocking APAC’s Economic and Digital Potential thro...
Technical Debt in the AI Coding Era - By Antonio Bianco
AQUEEL MUSHTAQUE FAKIH COMPUTER CENTER .
Report in SIP_Distance_Learning_Technology_Impact.pptx
TrustArc Webinar - Data Minimization in Practice_ Reducing Risk, Enhancing Co...
Decision Optimization - From Theory to Practice

Getting to Angular 2