SlideShare a Scribd company logo
Upgrading Angular
Chris Nicola
CTO @ WealthBar
Angular2 Upgrade
• Much better architecture/design
compared with 1.x
• Performance improvements
• Still “Angular-like”, to keep much the same
code organization
Why are we doing this?‣ Why A2?
‣ Experience
‣ Preparation
‣ Patterns
‣ The Future…
What about React?
‣ Why A2?
‣ Experience
‣ Preparation
‣ Patterns
‣ The Future…
‣ Why A2?
‣ Experience
‣ Preparation
‣ Patterns
‣ The Future…
Would I pick Angular Again?
‣ Why A2?
‣ Experience
‣ ngForward
‣ ngUpgrade
‣ The Good
‣ The Bad
‣ Preparation
‣ Patterns
‣ The Future…
• Converted AngularD3 1.x -> 2.x (aka A2D3)
• Tested out ngForward and ngUpgrade
• Upgraded existing 1.x code using
ngUpgrade
• Proof of concept mobile apps with Ionic 2
and NativeScript
Experience So Far…
‣ Why A2?
‣ Experience
‣ ngForward
‣ ngUpgrade
‣ The Good
‣ The Bad
‣ Preparation
‣ Patterns
‣ The Future…
• Write Angular 1.x components with 2.x
syntax
• If you don’t want to include Angular 2.x yet
• Templates and core directives are still 1.x
syntax
• Personally I do not find this approach useful
‣ Why A2?
‣ Experience
‣ ngForward
‣ ngUpgrade
‣ The Good
‣ The Bad
‣ Preparation
‣ Patterns
‣ The Future…
• Upgrade Angular 1.x directives, components and
services to use with Angular 2.x
• Downgrade Angular 2.x directives, components and
services to use with Angular 1.x
• Does not work with Filters/Pipes (easy to
workaround)
• 100% Angular 2.x support
• My recommended approach to upgrading
‣ Why A2?
‣ Experience
‣ ngForward
‣ ngUpgrade
‣ The Good
‣ The Bad
‣ Preparation
‣ Patterns
‣ The Future…
• Glad to be rid of `ctrl.`,`$scope` and even
Controllers
• Reactive Programming with RxJS
• LifeCycle events
• One directional data by default
• ngUpgrade works surprisingly well
‣ Why A2?
‣ Experience
‣ ngForward
‣ ngUpgrade
‣ The Good
‣ The Bad
‣ Preparation
‣ Patterns
‣ The Future…
• Too Big! >100kb minified+gzip
• Beta is still unstable
• Error messages are still hopeless
• So. Much. Static. Typing. aka “React
Enterprise Edition”
‣ Why A2?
‣ Experience
‣ Preparation
‣ Webpack
‣ ES6 or TS
‣ Organize
‣ Refactor
‣ Patterns
‣ The Future…
• You’re going to need a module loader!
• Webpack is arguably best-in-class
• Wide support for assets TS, ES6, HTML,
CSS, images, etc., etc., etc.
• Flexible, extensible, relatively easy to use
‣ Why A2?
‣ Experience
‣ Preparation
‣ Webpack
‣ ES6 or TS
‣ Organize
‣ Refactor
‣ Patterns
‣ The Future…
• Use Babel or Typescript
• Better get used Types and annotations
• aka React Enterprise Edition™
• My recommendation: Typescript
‣ Why A2?
‣ Experience
‣ Preparation
‣ Webpack
‣ ES6 or TS
‣ Organize
‣ Refactor
‣ Patterns
‣ The Future…
• Angular Style Guide https://github.com/johnpapa/angular-
styleguide
• Organize by component/features
• /component/component-name
• index.(ts|js) is the component root
• Include templates, styles and component specific services
• Organize shared code under “core” or “lib”
• Core services (e.g. Data/API)
• Attribute Directives
• Filters/Pipes
‣ Why A2?
‣ Experience
‣ Preparation
‣ Webpack
‣ ES6 or TS
‣ Organize
‣ Refactor
‣ Patterns
‣ The Future…
- app
- index.ts
- services
- index.ts
- resources.ts
- geolocation.ts
- filters/pipes
- date.ts
- directives
- highlight.ts
- float_label.ts
- components
- calendar
- index.ts
- calendar.html
- calendar.scss
- calendar_service.ts
- calculator
- index.ts
- template.html
- styles.css
- calculation_engine.ts
‣ Why A2?
‣ Experience
‣ Preparation
‣ Webpack
‣ ES6 or TS
‣ Organize
‣ Refactor
‣ Patterns
‣ The Future…
• “Pre-Upgrade” components
• Prefer `module.component`
• Prefer element selectors
• Extract controller as an exported class and avoid linking functions
• Use getter/setters over `$scope.$watch`
• Identify “attribute directives”
• Template-less directives that often interact directly with the DOM
• Prefer attribute selectors
• “Pre-Upgrade” services
• Extract service code into an exported class
• Pass it to `module.service`
• Rewrite filters as Angular 2.x Pipes
• Use an Angular 2.x Pipe compatible interface and a Pipe class to inherit from it
• Use an instance (singleton) of the Pipe in a `module.filter` shim
Upgrade Angular 1.x Component‣ Why A2?
‣ Experience
‣ Preparation
‣ Patterns
‣ Adapter
‣ Components
‣ Providers
‣ Directives
‣ Pipes/Filters
‣ The Future…
Downgraded Angular 2.x Component
https://gist.github.com/chrisnicola/
ec0f45b2819f352c8100#file-
downgradedangular2component-ts
‣ Why A2?
‣ Experience
‣ Preparation
‣ Patterns
‣ Upgrade
‣ Components
‣ Providers
‣ Directives
‣ Pipes/Filters
‣ The Future…
Downgraded Angular 2.x Service
https://gist.github.com/chrisnicola/
ec0f45b2819f352c8100#file-
downgradedangular2provider-ts
‣ Why A2?
‣ Experience
‣ Preparation
‣ Patterns
‣ Adapter
‣ Components
‣ Providers
‣ Directives
‣ Pipes/Filters
‣ The Future…
Angular 2.x Attribute Directive
https://github.com/WealthBar/angular-d3/blob/
angular-2/src/angularD3/directives/bars.ts
‣ Why A2?
‣ Experience
‣ Preparation
‣ Patterns
‣ Adapter
‣ Components
‣ Providers
‣ Directives
‣ Pipes/Filters
‣ The Future…
https://github.com/WealthBar/angular-d3/blob/
angular-2/src/app/app.html
Pipe/Filter Shim
https://gist.github.com/chrisnicola/
ec0f45b2819f352c8100#file-pipefiltershim-ts
‣ Why A2?
‣ Experience
‣ Preparation
‣ Patterns
‣ Adapter
‣ Components
‣ Providers
‣ Directives
‣ Pipes/Filters
‣ Why A2?
‣ The Future…
‣ Why A2?
‣ Experience
‣ Preparation
‣ Patterns
‣ The Future…
• Prefer converting 1.x services to 2.x
services and downgrade them (over
upgrading 1.x services)
• Refactor by component or route/page tree
• Adapters will temporarily support shared,
legacy or core dependencies
• Once you hit 80% 2.x code, freeze features
for a final push to remove remaining code.
More Tips
‣ Why A2?
‣ Experience
‣ Preparation
‣ Patterns
‣ The Future…
‣ Impending
‣ “Soon”
‣ Maybe
‣ Why A2?
‣ Experience
‣ Preparation
‣ Patterns
‣ The Future…
‣ Impending
‣ “Soon”
‣ Maybe
‣ Why A2?
‣ Experience
‣ Preparation
‣ Patterns
‣ The Future…
‣ Impending
‣ “Soon”
‣ Maybe
• Much smaller size
• Improved error messages
• Animations
• i18n and l11n
• Ionic 2 and NativeScript
‣ Why A2?
‣ Experience
‣ Preparation
‣ Patterns
‣ The Future…
‣ Impending
‣ “Soon”
‣ Maybe
• Isometric Support
• Hot code reloading
• Much more debugging tooling
‣ Why A2?
‣ Experience
‣ Preparation
‣ Patterns
‣ The Future…
‣ Impending
‣ “Soon”
‣ Maybe
• Isometric support for other framework
(Rails, Django, .NET)
• AngularJS Native
• Virtual DOM plugin (doubtful)
‣ 
• Official Docs https://angular.io/docs/ts/
latest/guide/upgrade.html
• Unofficial Guide http://
blog.thoughtram.io/angular/2015/10/24/
upgrading-apps-to-angular-2-using-
ngupgrade.html
Other Resources
Questions?
Thoughts?
Chris Nicola
CTO @ WealthBar

More Related Content

What's hot (20)

PDF
The Ultimate Getting Started with Angular Workshop - Devoxx France 2017
Matt Raible
 
PDF
Hadoop Summit 2013 : Continuous Integration on top of hadoop
Wisely chen
 
PPTX
Comparing Agile QA Approaches to End-to-End Testing
Katie Chin
 
PDF
Continuous Integration for Spark Apps by Sean McIntyre
Spark Summit
 
PDF
What's New in JHipsterLand - Devoxx US 2017
Matt Raible
 
PDF
Continuous delivery of your legacy application
ColdFusionConference
 
PPTX
Glance at Visual Studio 2013 ASP.NET and Web tools 2013
Shravan Kumar Kasagoni
 
PPTX
Azug BE Session Nov 2018 Wim Van den Broeck
Wim Van den Broeck
 
PPTX
Automated Acceptance Tests & Tool choice
toddbr
 
PDF
Run Fast, Try Not to Break S**t
Michael Schmidt
 
PPTX
Angular TS(typescript)
Ivan Stepić
 
PDF
Digital Success Stack for DCBKK 2018
Kyvio
 
PDF
Branching Strategies: Feature Branches vs Branch by Abstraction
Chris Birchall
 
PDF
Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017)
🎤 Hanno Embregts 🎸
 
PDF
Getting your mobile test automation process in place - using Cucumber and Cal...
Niels Frydenholm
 
PDF
Trunk based development
go_oh
 
PPTX
Prototyping Office AddIns using ScriptLab
Riwut Libinuko
 
PDF
From 0 to 100: How we jump-started our frontend testing
Henning Muszynski
 
PDF
Webpack and angularjs
Nir Kaufman
 
PDF
An almost complete continuous delivery pipeline including configuration manag...
ulfmansson
 
The Ultimate Getting Started with Angular Workshop - Devoxx France 2017
Matt Raible
 
Hadoop Summit 2013 : Continuous Integration on top of hadoop
Wisely chen
 
Comparing Agile QA Approaches to End-to-End Testing
Katie Chin
 
Continuous Integration for Spark Apps by Sean McIntyre
Spark Summit
 
What's New in JHipsterLand - Devoxx US 2017
Matt Raible
 
Continuous delivery of your legacy application
ColdFusionConference
 
Glance at Visual Studio 2013 ASP.NET and Web tools 2013
Shravan Kumar Kasagoni
 
Azug BE Session Nov 2018 Wim Van den Broeck
Wim Van den Broeck
 
Automated Acceptance Tests & Tool choice
toddbr
 
Run Fast, Try Not to Break S**t
Michael Schmidt
 
Angular TS(typescript)
Ivan Stepić
 
Digital Success Stack for DCBKK 2018
Kyvio
 
Branching Strategies: Feature Branches vs Branch by Abstraction
Chris Birchall
 
Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017)
🎤 Hanno Embregts 🎸
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Niels Frydenholm
 
Trunk based development
go_oh
 
Prototyping Office AddIns using ScriptLab
Riwut Libinuko
 
From 0 to 100: How we jump-started our frontend testing
Henning Muszynski
 
Webpack and angularjs
Nir Kaufman
 
An almost complete continuous delivery pipeline including configuration manag...
ulfmansson
 

Similar to Angular2 Upgrade (20)

PDF
Angular (v2 and up) - Morning to understand - Linagora
LINAGORA
 
PPTX
Angular 2
Travis van der Font
 
PPTX
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
PDF
Angular - Chapter 1 - Introduction
WebStackAcademy
 
PPTX
TypeScript and Angular2 (Love at first sight)
Igor Talevski
 
PDF
AzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
JSC “Arcadia Inc”
 
PDF
How angularjs saves rails
Michael He
 
PDF
Dust.js
Yevgeniy Brikman
 
KEY
Rapid development with Rails
Yi-Ting Cheng
 
PDF
Distributed Versioning Tools, BeJUG 2010
Pursuit Consulting
 
PDF
CI/CD and Asset Serving for Single Page Apps
Mike North
 
PPTX
Angular Owin Katana TypeScript
Justin Wendlandt
 
PDF
Angular, the New Angular JS
Kenzan
 
ODP
Angular 6 - The Complete Guide
Sam Dias
 
PPTX
A modern architecturereview–usingcodereviewtools-ver-3.5
SSW
 
PDF
Achieving Full Stack DevOps at Colonial Life
DevOps.com
 
PDF
Next Generation Architecture Showcase July 2019
Alan Pearson Mathews
 
PDF
Continuous delivery from the trenches
Michael Medin
 
PDF
Titanium Alloy Tutorial
Fokke Zandbergen
 
PPTX
Angular2.0@Shanghai0319
Bibby Chung
 
Angular (v2 and up) - Morning to understand - Linagora
LINAGORA
 
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
Angular - Chapter 1 - Introduction
WebStackAcademy
 
TypeScript and Angular2 (Love at first sight)
Igor Talevski
 
AzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
JSC “Arcadia Inc”
 
How angularjs saves rails
Michael He
 
Rapid development with Rails
Yi-Ting Cheng
 
Distributed Versioning Tools, BeJUG 2010
Pursuit Consulting
 
CI/CD and Asset Serving for Single Page Apps
Mike North
 
Angular Owin Katana TypeScript
Justin Wendlandt
 
Angular, the New Angular JS
Kenzan
 
Angular 6 - The Complete Guide
Sam Dias
 
A modern architecturereview–usingcodereviewtools-ver-3.5
SSW
 
Achieving Full Stack DevOps at Colonial Life
DevOps.com
 
Next Generation Architecture Showcase July 2019
Alan Pearson Mathews
 
Continuous delivery from the trenches
Michael Medin
 
Titanium Alloy Tutorial
Fokke Zandbergen
 
Angular2.0@Shanghai0319
Bibby Chung
 
Ad

Recently uploaded (20)

PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Ad

Angular2 Upgrade

  • 3. • Much better architecture/design compared with 1.x • Performance improvements • Still “Angular-like”, to keep much the same code organization Why are we doing this?‣ Why A2? ‣ Experience ‣ Preparation ‣ Patterns ‣ The Future…
  • 4. What about React? ‣ Why A2? ‣ Experience ‣ Preparation ‣ Patterns ‣ The Future…
  • 5. ‣ Why A2? ‣ Experience ‣ Preparation ‣ Patterns ‣ The Future… Would I pick Angular Again?
  • 6. ‣ Why A2? ‣ Experience ‣ ngForward ‣ ngUpgrade ‣ The Good ‣ The Bad ‣ Preparation ‣ Patterns ‣ The Future… • Converted AngularD3 1.x -> 2.x (aka A2D3) • Tested out ngForward and ngUpgrade • Upgraded existing 1.x code using ngUpgrade • Proof of concept mobile apps with Ionic 2 and NativeScript Experience So Far…
  • 7. ‣ Why A2? ‣ Experience ‣ ngForward ‣ ngUpgrade ‣ The Good ‣ The Bad ‣ Preparation ‣ Patterns ‣ The Future… • Write Angular 1.x components with 2.x syntax • If you don’t want to include Angular 2.x yet • Templates and core directives are still 1.x syntax • Personally I do not find this approach useful
  • 8. ‣ Why A2? ‣ Experience ‣ ngForward ‣ ngUpgrade ‣ The Good ‣ The Bad ‣ Preparation ‣ Patterns ‣ The Future… • Upgrade Angular 1.x directives, components and services to use with Angular 2.x • Downgrade Angular 2.x directives, components and services to use with Angular 1.x • Does not work with Filters/Pipes (easy to workaround) • 100% Angular 2.x support • My recommended approach to upgrading
  • 9. ‣ Why A2? ‣ Experience ‣ ngForward ‣ ngUpgrade ‣ The Good ‣ The Bad ‣ Preparation ‣ Patterns ‣ The Future… • Glad to be rid of `ctrl.`,`$scope` and even Controllers • Reactive Programming with RxJS • LifeCycle events • One directional data by default • ngUpgrade works surprisingly well
  • 10. ‣ Why A2? ‣ Experience ‣ ngForward ‣ ngUpgrade ‣ The Good ‣ The Bad ‣ Preparation ‣ Patterns ‣ The Future… • Too Big! >100kb minified+gzip • Beta is still unstable • Error messages are still hopeless • So. Much. Static. Typing. aka “React Enterprise Edition”
  • 11. ‣ Why A2? ‣ Experience ‣ Preparation ‣ Webpack ‣ ES6 or TS ‣ Organize ‣ Refactor ‣ Patterns ‣ The Future… • You’re going to need a module loader! • Webpack is arguably best-in-class • Wide support for assets TS, ES6, HTML, CSS, images, etc., etc., etc. • Flexible, extensible, relatively easy to use
  • 12. ‣ Why A2? ‣ Experience ‣ Preparation ‣ Webpack ‣ ES6 or TS ‣ Organize ‣ Refactor ‣ Patterns ‣ The Future… • Use Babel or Typescript • Better get used Types and annotations • aka React Enterprise Edition™ • My recommendation: Typescript
  • 13. ‣ Why A2? ‣ Experience ‣ Preparation ‣ Webpack ‣ ES6 or TS ‣ Organize ‣ Refactor ‣ Patterns ‣ The Future… • Angular Style Guide https://github.com/johnpapa/angular- styleguide • Organize by component/features • /component/component-name • index.(ts|js) is the component root • Include templates, styles and component specific services • Organize shared code under “core” or “lib” • Core services (e.g. Data/API) • Attribute Directives • Filters/Pipes
  • 14. ‣ Why A2? ‣ Experience ‣ Preparation ‣ Webpack ‣ ES6 or TS ‣ Organize ‣ Refactor ‣ Patterns ‣ The Future… - app - index.ts - services - index.ts - resources.ts - geolocation.ts - filters/pipes - date.ts - directives - highlight.ts - float_label.ts - components - calendar - index.ts - calendar.html - calendar.scss - calendar_service.ts - calculator - index.ts - template.html - styles.css - calculation_engine.ts
  • 15. ‣ Why A2? ‣ Experience ‣ Preparation ‣ Webpack ‣ ES6 or TS ‣ Organize ‣ Refactor ‣ Patterns ‣ The Future… • “Pre-Upgrade” components • Prefer `module.component` • Prefer element selectors • Extract controller as an exported class and avoid linking functions • Use getter/setters over `$scope.$watch` • Identify “attribute directives” • Template-less directives that often interact directly with the DOM • Prefer attribute selectors • “Pre-Upgrade” services • Extract service code into an exported class • Pass it to `module.service` • Rewrite filters as Angular 2.x Pipes • Use an Angular 2.x Pipe compatible interface and a Pipe class to inherit from it • Use an instance (singleton) of the Pipe in a `module.filter` shim
  • 16. Upgrade Angular 1.x Component‣ Why A2? ‣ Experience ‣ Preparation ‣ Patterns ‣ Adapter ‣ Components ‣ Providers ‣ Directives ‣ Pipes/Filters ‣ The Future…
  • 17. Downgraded Angular 2.x Component https://gist.github.com/chrisnicola/ ec0f45b2819f352c8100#file- downgradedangular2component-ts ‣ Why A2? ‣ Experience ‣ Preparation ‣ Patterns ‣ Upgrade ‣ Components ‣ Providers ‣ Directives ‣ Pipes/Filters ‣ The Future…
  • 18. Downgraded Angular 2.x Service https://gist.github.com/chrisnicola/ ec0f45b2819f352c8100#file- downgradedangular2provider-ts ‣ Why A2? ‣ Experience ‣ Preparation ‣ Patterns ‣ Adapter ‣ Components ‣ Providers ‣ Directives ‣ Pipes/Filters ‣ The Future…
  • 19. Angular 2.x Attribute Directive https://github.com/WealthBar/angular-d3/blob/ angular-2/src/angularD3/directives/bars.ts ‣ Why A2? ‣ Experience ‣ Preparation ‣ Patterns ‣ Adapter ‣ Components ‣ Providers ‣ Directives ‣ Pipes/Filters ‣ The Future… https://github.com/WealthBar/angular-d3/blob/ angular-2/src/app/app.html
  • 20. Pipe/Filter Shim https://gist.github.com/chrisnicola/ ec0f45b2819f352c8100#file-pipefiltershim-ts ‣ Why A2? ‣ Experience ‣ Preparation ‣ Patterns ‣ Adapter ‣ Components ‣ Providers ‣ Directives ‣ Pipes/Filters ‣ Why A2? ‣ The Future…
  • 21. ‣ Why A2? ‣ Experience ‣ Preparation ‣ Patterns ‣ The Future… • Prefer converting 1.x services to 2.x services and downgrade them (over upgrading 1.x services) • Refactor by component or route/page tree • Adapters will temporarily support shared, legacy or core dependencies • Once you hit 80% 2.x code, freeze features for a final push to remove remaining code. More Tips
  • 22. ‣ Why A2? ‣ Experience ‣ Preparation ‣ Patterns ‣ The Future… ‣ Impending ‣ “Soon” ‣ Maybe
  • 23. ‣ Why A2? ‣ Experience ‣ Preparation ‣ Patterns ‣ The Future… ‣ Impending ‣ “Soon” ‣ Maybe
  • 24. ‣ Why A2? ‣ Experience ‣ Preparation ‣ Patterns ‣ The Future… ‣ Impending ‣ “Soon” ‣ Maybe • Much smaller size • Improved error messages • Animations • i18n and l11n • Ionic 2 and NativeScript
  • 25. ‣ Why A2? ‣ Experience ‣ Preparation ‣ Patterns ‣ The Future… ‣ Impending ‣ “Soon” ‣ Maybe • Isometric Support • Hot code reloading • Much more debugging tooling
  • 26. ‣ Why A2? ‣ Experience ‣ Preparation ‣ Patterns ‣ The Future… ‣ Impending ‣ “Soon” ‣ Maybe • Isometric support for other framework (Rails, Django, .NET) • AngularJS Native • Virtual DOM plugin (doubtful)
  • 27. ‣ • Official Docs https://angular.io/docs/ts/ latest/guide/upgrade.html • Unofficial Guide http:// blog.thoughtram.io/angular/2015/10/24/ upgrading-apps-to-angular-2-using- ngupgrade.html Other Resources