SlideShare a Scribd company logo
Migration from AngularJS
to Angular with UI-router
Aleks Zinevych
Front-end Tech Lead
at Datamart inc.
Speaker at
LvivJS conference,
various JS meetups
2https://goo.gl/kZovPa@a_zinewicz @aleksanderzinewicz
3
AngularJS vs Angular
Migration
Demo
Pros and Cons
Agenda
http://www.iconsfind.com/wp-content/uploads/2013/11/Emoticons-Sad.ico 4
AngularJS
https://docs.angularjs.org/guide/databinding 5
Two-way data binding
Model
View
https://larseidnes.com/2014/11/05/angularjs-the-bad-parts/ 6
Problems
Good for small projects
Bad for big projects
7
Universal apps
Server-side
JS
Client-side
JS
Shared JS
8
Server-side rendering
ng1-server
PhantomJS
jsDom
http://www.iconsfind.com/wp-content/uploads/2013/11/Emoticons-Sad.ico
https://thesensitivegut.files.wordpress.com/2017/03/complexitymonster_cropped_web-01.png 9
Hard to learn
https://openclipart.org/download/238687/Boy-asking-question.svg 10
https://cdn.worldvectorlogo.com/logos/angular-3.svg 11
12
Changes
One-way data binding
Server-side rendering
Simplicity
Mobile-oriented
Refactored core
https://gaboesquivel.com/slides/intro-to-angularjs/img/angularjs.jpg 13
VS.
https://auth0.com/blog/more-benchmarks-virtual-dom-vs-angular-12-vs-mithril-js-vs-the-rest/ 14
AngularJS vs. Angular
https://auth0.com/blog/more-benchmarks-virtual-dom-vs-angular-12-vs-mithril-js-vs-the-rest/ 15
AngularJS vs. Angular
16
Migration
http://u-cart.ca/wp-content/uploads/2016/06/stepbystep.jpg 17
https://openclipart.org/download/238687/Boy-asking-question.svg 18
https://blog.nrwl.io/ngupgrade-in-depth-436a52298a00 19
ngUpgrade
https://blog.nrwl.io/ngupgrade-in-depth-436a52298a00 20
ngUpgrade
AngularJS Angular
Component 1
Component 2
Component 1
Component 2
Upgrade
Downgrade
21
Inside Migration
22
Project details
AngularJS 1.5
UI-router < 1.*
Gulp tasks
External dependencies
23
How it worked before?
Url change
UI-Router
State Provider
/Route1
/Route2
/Route3
/Route4
…
Controller1 + View1
Controller2 + View2
Controller3 + View3
Controller4 + View4
24
Preparation
AngularJS
Webpack
UI-router
Yarn
Angular
1.6.4 1.*
Gulp NPM
25
How it’s working now?
Url Change
UI-Router
AngularJS State Provider
/Route1
/Route2
View1 + Controller1
View2 + Controller2
Angular State Provider
/Route3
/Route4
Component3
Component4
https://github.com/zinevych/angular-hybrid-sample 26
Sample App Details
https://github.com/zinevych/angular-hybrid-sample 27
Sample app structure
app
ng1Route
ng1MixedRoute
ng4Route
https://github.com/zinevych/angular-hybrid-sample 28
AngularJS routes
State config
AngularJS Component
https://github.com/zinevych/angular-hybrid-sample 29
Angular routes
State config
Angular Component
https://github.com/zinevych/angular-hybrid-sample 30
How it’s connected?
Angular Bootstrapping
AngularJS Bootstrapping
UI-Router init + Configuration
31
How it’s connected?
32
State object population
AngularJS Angular
https://github.com/zinevych/angular-hybrid-sample 33
AngularJS processing
Url Change
UI-Router
<ui-view />
AngularJS
Component
https://github.com/zinevych/angular-hybrid-sample 34
Angular processing
UIViewNgUpgrade
https://github.com/zinevych/angular-hybrid-sample 35
Angular Components processing
Url Change
UI-Router
<ui-view-ng-upgrade />
Downgrade
Angular
Component
https://github.com/zinevych/angular-hybrid-sample 36
Mixed component processing
UI-router config
AngularJS
https://github.com/zinevych/angular-hybrid-sample 37
Mixed component processing
Angular
https://github.com/zinevych/angular-hybrid-sample 38
Sample App Demo
39
Summary
http://blog.softheme.com/wp-content/uploads/2015/06/fan_rewrite_code.png 40
41
Cons
Speed of development
Performance
Dependencies
Bundle size
42
Pros
Angular
Future-oriented
Mobile-oriented
Better Testability
Modern approaches
43
Contacts
Email: aleksanderzinewicz@gmail.com
Facebook: aleks.zinevych
Twitter: @a_zinewicz
Medium: @aleksanderzinewicz
44
Thank you!
45
Questions?

More Related Content

PPTX
Angular 14.pptx
PPTX
PDF
Api gateway
PPTX
Angular modules in depth
PPTX
Angular Data Binding
PPTX
AngularJS - Présentation (french)
PDF
Angular Notes.pdf
PDF
Angular 11
Angular 14.pptx
Api gateway
Angular modules in depth
Angular Data Binding
AngularJS - Présentation (french)
Angular Notes.pdf
Angular 11

What's hot (20)

PPTX
What is Angular?
PPTX
Introduction to NGINX web server
PDF
Angular
PPTX
Présentation Git & GitHub
PPTX
Angular 9
PDF
Angular Directives | Angular 2 Custom Directives | Angular Tutorial | Angular...
PDF
Angular développer des applications .pdf
PDF
Designing APIs with OpenAPI Spec
PDF
JSON, JSON Schema, and OpenAPI
PDF
PPTX
PPTX
Angular overview
ODP
Angular 6 - The Complete Guide
PDF
RxJS & Angular Reactive Forms @ Codemotion 2019
PDF
Introduction to GitHub Actions
PPTX
Jenkins CI
DOCX
Angular Interview Questions & Answers
PDF
Terraform 0.12 + Terragrunt
PDF
Swagger With REST APIs.pptx.pdf
What is Angular?
Introduction to NGINX web server
Angular
Présentation Git & GitHub
Angular 9
Angular Directives | Angular 2 Custom Directives | Angular Tutorial | Angular...
Angular développer des applications .pdf
Designing APIs with OpenAPI Spec
JSON, JSON Schema, and OpenAPI
Angular overview
Angular 6 - The Complete Guide
RxJS & Angular Reactive Forms @ Codemotion 2019
Introduction to GitHub Actions
Jenkins CI
Angular Interview Questions & Answers
Terraform 0.12 + Terragrunt
Swagger With REST APIs.pptx.pdf
Ad

Similar to Migration from AngularJS to Angular (20)

PDF
Difference Between Angular and AngularJS.pdf
PDF
Front end microservices: architectures and solution
PPT
AngularJS – What, Why, Advantages and Disadvantages
PPTX
Angular Vs AngularJS: Key Differences You Need to Know
PDF
A white paper on Fundamentals and Implementations of Angular JS
PPTX
PDF
Angular JS - Develop Responsive Single Page Application
PDF
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
PDF
AngularJS : Superheroic Javascript MVW Framework
PDF
AngularJS : Superheroic JavaScript MVW Framework
PDF
Top 5 AngularJS Alternatives for Modern Web Development.pdf
PPTX
AngularJS – What, Why, Advantages and Disadvantages
PPTX
Java script framework
PDF
Where and Why Use Angular for Web Development?
PDF
Die Qual der Wahl bei den Single Page Application Frameworks
PDF
Fundamentals and Implementations of Angular JS with renowned Technology Platf...
PDF
Angular 2 - SSD 2016 London
PPTX
Building reusable components as micro frontends with glimmer js and webcompo...
PPTX
AngularJS
PPTX
Angular from Zero to Mastery - Training (Intermediate)
Difference Between Angular and AngularJS.pdf
Front end microservices: architectures and solution
AngularJS – What, Why, Advantages and Disadvantages
Angular Vs AngularJS: Key Differences You Need to Know
A white paper on Fundamentals and Implementations of Angular JS
Angular JS - Develop Responsive Single Page Application
Webinar on Angular JS titled 'Develop Responsive Single Page Application'
AngularJS : Superheroic Javascript MVW Framework
AngularJS : Superheroic JavaScript MVW Framework
Top 5 AngularJS Alternatives for Modern Web Development.pdf
AngularJS – What, Why, Advantages and Disadvantages
Java script framework
Where and Why Use Angular for Web Development?
Die Qual der Wahl bei den Single Page Application Frameworks
Fundamentals and Implementations of Angular JS with renowned Technology Platf...
Angular 2 - SSD 2016 London
Building reusable components as micro frontends with glimmer js and webcompo...
AngularJS
Angular from Zero to Mastery - Training (Intermediate)
Ad

Recently uploaded (20)

PDF
Comprehensive Salesforce Implementation Services.pdf
DOCX
The Future of Smart Factories Why Embedded Analytics Leads the Way
PPTX
Benefits of DCCM for Genesys Contact Center
PPTX
10 Hidden App Development Costs That Can Sink Your Startup.pptx
PPTX
Computer Hardware tool: hand tools, diagnostics, ESD and cleaning tools
PDF
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
PDF
Emergency Mustering solutions – A Brief overview
PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
PPTX
Services offered by Dynamic Solutions in Pakistan
PPTX
What to Capture When It Breaks: 16 Artifacts That Reveal Root Causes
PDF
A REACT POMODORO TIMER WEB APPLICATION.pdf
PDF
Rise With SAP partner in Mumbai.........
PDF
The Future of Smart Factories Why Embedded Analytics Leads the Way
PDF
Become an Agentblazer Champion Challenge Kickoff
PDF
Build Multi-agent using Agent Development Kit
PDF
Perfecting Gamer’s Experiences with Performance Testing for Gaming Applicatio...
PPTX
Materi-Enum-and-Record-Data-Type (1).pptx
PDF
Sensix-Tech-Pvt-Ltd-Company-Profile (1).pdf
PDF
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
PPTX
Dynamic Solutions Project Pitch Presentation
Comprehensive Salesforce Implementation Services.pdf
The Future of Smart Factories Why Embedded Analytics Leads the Way
Benefits of DCCM for Genesys Contact Center
10 Hidden App Development Costs That Can Sink Your Startup.pptx
Computer Hardware tool: hand tools, diagnostics, ESD and cleaning tools
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
Emergency Mustering solutions – A Brief overview
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Services offered by Dynamic Solutions in Pakistan
What to Capture When It Breaks: 16 Artifacts That Reveal Root Causes
A REACT POMODORO TIMER WEB APPLICATION.pdf
Rise With SAP partner in Mumbai.........
The Future of Smart Factories Why Embedded Analytics Leads the Way
Become an Agentblazer Champion Challenge Kickoff
Build Multi-agent using Agent Development Kit
Perfecting Gamer’s Experiences with Performance Testing for Gaming Applicatio...
Materi-Enum-and-Record-Data-Type (1).pptx
Sensix-Tech-Pvt-Ltd-Company-Profile (1).pdf
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Dynamic Solutions Project Pitch Presentation

Migration from AngularJS to Angular

Editor's Notes

  • #3: Починав як дот нет розробник далі груві рубі нода + джс на фронтенді
  • #4: Поговоримо про енгюлар джіес якій його проблеми і що вирішує якраз новий ангуляр
  • #5: Хто не любить ангуляр? Давайте поговоримо про проблеми
  • #6: Коли ми говоримо про ангуляр то відразу в нас все асоціюється з дейта біндінгом
  • #7: Хороший для малих проектів поганий для великих
  • #8: Сьогодні дуже популярними стали юніверсал апи
  • #10: React comparison
  • #11: Як ми знаємо новий англуяр це абсолютно новий фремворк повністю переписнай… так давайте подумаємо чи переписували б вони якби з ним все було ок --- ні, але вони переписали
  • #12: Поговоримо про новий англуяр, внести ясність з неймінгом
  • #14: Щоб не бути голослівним ось бенчмаркінги
  • #27: Семпл апплікейшин з прикладом того як ми це реалізовували в нашому проекті, зараз я би хотів розповісти про нього трохи детальніше, після чого перейдемо до демострації