SlideShare a Scribd company logo
1 of 42
What’s new in Angular 2?
A COMPARISON BETWEEN NG1.X AND NG2
Alfred Jett Grandeza
Founder, Leangineer @ Lean Consulting
leanconsulting.ph | ajgrandeza.com
Lean Consulting
• Davao based start-up
• Founded: February 2016
• Lean Academy SOON!
• More info:
• leanconsulting.ph
• fb.com/leanconsutling.ph
About Me
•Graduate of Ateneo de Davao, Computer Science 2012
•Over 5 years of software engineering experience, .NET and AngularJS
•Former CTO of T.H.E. Patrons
•Co-founder of Lean Consulting/Lean Academy
•Microsoft Technology Associate (2)
•Member of Davao .NET Community (Davao .NET Users Group, Philippine .NET Users Group)
•I do consulting and freelance work from clients overseas
•Advocate of .NET Technologies
•I LOVE TO LEARN!
Prerequisites & Tools
• Required
• JavaScript
• HTML
• CSS
• Helpful
• OOP concepts
• Visual Studio Community
• https://www.visualstudio.com/
• Visual Studio Code
• https://code.visualstudio.com/
Single Page Application
• SPAs are web apps that load a single HTML page and dynamically that page as the user interacts
• Much of the work happen in the client side
• Usually written in JavaScript
SPA Lifecycle
Angular is…
• Open source, JavaScript based front-end framework
• Used for building client-side applications
• MVW Framework (Model-View-Whatever)
• Mainly maintained by Google
Why use Angular?
• Expressive/Customizable HTML
• Powerful Data Binding
• Modular
• Easy back-end integration
Application Demo
• NG 1.X App
• NG 2 App
Key Features of Angular 1.X
• Directives
• Data binding
• Views
• Controllers
• $scope
• Modules
• Dependency Injection
• Routes
• Services
What is a directive?
• Extends HTML attributes, with the prefix “ng-”
• Teaches HTML new tricks
• There are built-in directives
• ng-app
• ng-view
• You can also create your own custom directives
Data Binding
• Interpolation
• {{name}}
• Event Binding
• ng-click=“onClick()”
• Two-way Binding
• <input ng-model=“name” />
Filters & Pipes
• Filters can be added to filter an array
•Pipes can be used to format a data
Views, Controllers, Scope
•View – UI / Display
•Controllers – Controls the logic, data and flow
•$scope is the “glue” between controller and view or the ViewModel
Modules & DI
• A container for the different parts of your Angular app
• You can package code as reusable modules
• You may inject different modules to your module
• Dependency Injection
• Instantiate a module
• ng-app=“”
• Creating a module
• angular.module(‘demoApp’, [])
Routes
• is used for deep-linking URLs to controllers and views
Services
• Are for organizing and share code across your application
Summary for NG1
Key Features
• Directives
• Data binding
• Views
• Controllers
• $scope
• Modules
• Dependency Injection
• Routes
• Services
Angular 2.0
with TypeScript
Live release: Sept 16, 2016
http://angularjs.blogspot.com/2016/09/angular2-final.html
Why Angular 2?
• Built for speed
• Modern
• Simplified API
• Enhanced Productivity
• Develop Across All Platforms
What is TypeScript?
• Open source programming language
• Developed and maintained by Microsoft
• A superset of JavaScript
• Transpiles to plain JavaScript
• Strongly typed
• Class based / OOP approach
• Learn more:
• http://www.typescriptlang.org/Playground
Setting up
• Download
• https://github.com/angular/quickstart
Angular 2 Key Features
• Components
• Templates
• Directives
• Data Binding & Pipes
• Life-cycle hooks
• Services
• Dependency Injection
• Routes
Anatomy of NG 2
Image grabbed from: https://www.pluralsight.com/courses/angular-2-getting-started
Anatomy of a Component
Image grabbed from: https://www.pluralsight.com/courses/angular-2-getting-started
Components
Image grabbed from: https://www.pluralsight.com/courses/angular-2-getting-started
Components
Import statements
Metadata & Template
Class
Decorator
• A function that adds metadata to a class
• Prefixed with an @
• @Component()
Defining a Template in a Component
• Inline template
•Linked Template
Data Binding
• Coordinates communication between the component’s class and template
• Interpolation
• {{name}}
• Event Binding
• (click)=‘onClick()’
• Two-way Binding
• <input [(ngModel)]=‘name’ />
• Property Binding
• <img [src] = ‘customer.thumbnail’ />
Directive in NG2
• Built-in directives
• *ngIf
• *ngFor
Pipes
• | lowercase
• | currency
• | uppercase
• No more filter 
• You have to create your own pipe
Lifecycle Hooks
• A component has a lifecycle
• Angular offers component lifecycle hooks that give us ability to capture these moments
• In other words, events
• Samples
• OnInit
• OnChanges
• OnDestory
Services
• Services are independent from any components
• To provide shared data, logic across multiple components
• Encapsulate external interactions (i.e. Rest API)
Services
Dependency Injection
• A design pattern to resolve dependencies
Retrieve Data using Http
Returns Observables instead of Promises
What is RxJS?
• RxJS is a javascript library for composing asynchronous & event-based programs by using
observable sequences
• Used within Angular
• More info
• http://reactivex.io/rxjs/
Promises vs Observable
• Promise
• Returns a single value
• Not cancellable
• Observable
• Works with multiple values over time
• Cancellable
• “Retryable”
• Supports map, filter, reduce, etc..
Routing
Summary
• Huge difference between NG1 & NG2, in terms of syntax
• NG2 is simpler in terms of Architecture
• TypeScript makes the job easier
References
•https://angular.io/docs/ts/latest/quickstart.html
•https://www.pluralsight.com/courses/angular-2-getting-started
•https://auth0.com/blog/angular-2-series-part-2-domain-models-and-dependency-injection/
•https://auth0.com/blog/angular-2-series-part-3-using-http/

More Related Content

What's hot

Introduction to Android Programming
Introduction to Android ProgrammingIntroduction to Android Programming
Introduction to Android ProgrammingRaveendra R
 
Overview about AngularJS Framework
Overview about AngularJS Framework Overview about AngularJS Framework
Overview about AngularJS Framework Camilo Lopes
 
Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Max Klymyshyn
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slidessamhelman
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSAldo Pizzagalli
 
Gettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSGettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSArmin Vieweg
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day WorkshopShyam Seshadri
 
Introduction to single page application with angular js
Introduction to single page application with angular jsIntroduction to single page application with angular js
Introduction to single page application with angular jsMindfire Solutions
 
Angular JS - Develop Responsive Single Page Application
Angular JS - Develop Responsive Single Page ApplicationAngular JS - Develop Responsive Single Page Application
Angular JS - Develop Responsive Single Page ApplicationEdureka!
 
One Weekend With AngularJS
One Weekend With AngularJSOne Weekend With AngularJS
One Weekend With AngularJSYashobanta Bai
 
AngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsAngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsMaurice De Beijer [MVP]
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate
 

What's hot (19)

Introduction to Android Programming
Introduction to Android ProgrammingIntroduction to Android Programming
Introduction to Android Programming
 
Overview about AngularJS Framework
Overview about AngularJS Framework Overview about AngularJS Framework
Overview about AngularJS Framework
 
AngularJS
AngularJSAngularJS
AngularJS
 
AngularJS is awesome
AngularJS is awesomeAngularJS is awesome
AngularJS is awesome
 
Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slides
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Gettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSGettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJS
 
Training On Angular Js
Training On Angular JsTraining On Angular Js
Training On Angular Js
 
Angular Seminar-js
Angular Seminar-jsAngular Seminar-js
Angular Seminar-js
 
Angular js PPT
Angular js PPTAngular js PPT
Angular js PPT
 
Angular js
Angular jsAngular js
Angular js
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
 
Introduction to single page application with angular js
Introduction to single page application with angular jsIntroduction to single page application with angular js
Introduction to single page application with angular js
 
Angular JS - Develop Responsive Single Page Application
Angular JS - Develop Responsive Single Page ApplicationAngular JS - Develop Responsive Single Page Application
Angular JS - Develop Responsive Single Page Application
 
One Weekend With AngularJS
One Weekend With AngularJSOne Weekend With AngularJS
One Weekend With AngularJS
 
AngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsAngularJS = Browser applications on steroids
AngularJS = Browser applications on steroids
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js Tutorials
 
Introduction to Angular JS
Introduction to Angular JSIntroduction to Angular JS
Introduction to Angular JS
 

Viewers also liked

OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...Maarten Balliauw
 
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access ControlOAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access ControlMaarten Balliauw
 
REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)Jef Claes
 
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
OAuth-as-a-serviceusing ASP.NET Web API and Windows Azure Access ControlOAuth-as-a-serviceusing ASP.NET Web API and Windows Azure Access Control
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access ControlMaarten Balliauw
 
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015OAuth with AngularJS and WebAPI - SoCal Code Camp 2015
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015Stuart
 
29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview QuestionsArc & Codementor
 

Viewers also liked (9)

Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control - W...
 
Introduction to HTML4
Introduction to HTML4Introduction to HTML4
Introduction to HTML4
 
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access ControlOAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
 
REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)REST and ASP.NET Web API (Milan)
REST and ASP.NET Web API (Milan)
 
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
OAuth-as-a-serviceusing ASP.NET Web API and Windows Azure Access ControlOAuth-as-a-serviceusing ASP.NET Web API and Windows Azure Access Control
OAuth-as-a-service using ASP.NET Web API and Windows Azure Access Control
 
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015OAuth with AngularJS and WebAPI - SoCal Code Camp 2015
OAuth with AngularJS and WebAPI - SoCal Code Camp 2015
 
29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions29 Essential AngularJS Interview Questions
29 Essential AngularJS Interview Questions
 
Javaoop
JavaoopJavaoop
Javaoop
 

Similar to What's new in Angular 2?

Angular Live training basic to Advance
Angular Live training basic to Advance Angular Live training basic to Advance
Angular Live training basic to Advance Dot Net Tricks
 
Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 |
Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 | Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 |
Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 | Shailendra Chauhan
 
Unlimited training using Angular p_p_t
Unlimited training  using Angular   p_p_tUnlimited training  using Angular   p_p_t
Unlimited training using Angular p_p_tNeelaSaiKiran
 
Mastering angular - Dot Net Tricks
Mastering angular - Dot Net TricksMastering angular - Dot Net Tricks
Mastering angular - Dot Net TricksGaurav Singh
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Learning AngularJS  - Complete coverage of AngularJS features and conceptsLearning AngularJS  - Complete coverage of AngularJS features and concepts
Learning AngularJS - Complete coverage of AngularJS features and conceptsSuresh Patidar
 
Angular js 2
Angular js 2Angular js 2
Angular js 2Ran Wahle
 
AngularJs (1.x) Presentation
AngularJs (1.x) PresentationAngularJs (1.x) Presentation
AngularJs (1.x) PresentationRaghubir Singh
 
Angularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetupAngularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetupGoutam Dey
 
Angular js Online Training
Angular js Online TrainingAngular js Online Training
Angular js Online TrainingLearntek1
 
Angular2 with type script
Angular2 with type scriptAngular2 with type script
Angular2 with type scriptRavi Mone
 
angular-concepts-introduction-slides.pptx
angular-concepts-introduction-slides.pptxangular-concepts-introduction-slides.pptx
angular-concepts-introduction-slides.pptxshekharmpatil1309
 

Similar to What's new in Angular 2? (20)

Angular
AngularAngular
Angular
 
Angular Live training basic to Advance
Angular Live training basic to Advance Angular Live training basic to Advance
Angular Live training basic to Advance
 
Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 |
Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 | Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 |
Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 |
 
Unlimited training using Angular p_p_t
Unlimited training  using Angular   p_p_tUnlimited training  using Angular   p_p_t
Unlimited training using Angular p_p_t
 
Mastering angular - Dot Net Tricks
Mastering angular - Dot Net TricksMastering angular - Dot Net Tricks
Mastering angular - Dot Net Tricks
 
Module2
Module2Module2
Module2
 
Angular js firebase-preso
Angular js firebase-presoAngular js firebase-preso
Angular js firebase-preso
 
Introduction to AngularJs
Introduction to AngularJsIntroduction to AngularJs
Introduction to AngularJs
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Learning AngularJS  - Complete coverage of AngularJS features and conceptsLearning AngularJS  - Complete coverage of AngularJS features and concepts
Learning AngularJS - Complete coverage of AngularJS features and concepts
 
Angular2
Angular2Angular2
Angular2
 
Angular js 2
Angular js 2Angular js 2
Angular js 2
 
AngularJs (1.x) Presentation
AngularJs (1.x) PresentationAngularJs (1.x) Presentation
AngularJs (1.x) Presentation
 
Angularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetupAngularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetup
 
Angular js
Angular jsAngular js
Angular js
 
Angular js Online Training
Angular js Online TrainingAngular js Online Training
Angular js Online Training
 
Angular js
Angular jsAngular js
Angular js
 
Angularjs Basics
Angularjs BasicsAngularjs Basics
Angularjs Basics
 
Asp.Net MVC 5 in Arabic
Asp.Net MVC 5 in ArabicAsp.Net MVC 5 in Arabic
Asp.Net MVC 5 in Arabic
 
Angular2 with type script
Angular2 with type scriptAngular2 with type script
Angular2 with type script
 
angular-concepts-introduction-slides.pptx
angular-concepts-introduction-slides.pptxangular-concepts-introduction-slides.pptx
angular-concepts-introduction-slides.pptx
 

More from Alfred Jett Grandeza

Automated testing using Selenium & NUnit
Automated testing using Selenium & NUnitAutomated testing using Selenium & NUnit
Automated testing using Selenium & NUnitAlfred Jett Grandeza
 
Software Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry PracticesSoftware Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry PracticesAlfred Jett Grandeza
 
Career Options for CS/IT/IS graduates
Career Options for CS/IT/IS graduatesCareer Options for CS/IT/IS graduates
Career Options for CS/IT/IS graduatesAlfred Jett Grandeza
 
Introducing MS VS LightSwitch 2011
Introducing MS VS LightSwitch 2011Introducing MS VS LightSwitch 2011
Introducing MS VS LightSwitch 2011Alfred Jett Grandeza
 

More from Alfred Jett Grandeza (7)

Automated testing using Selenium & NUnit
Automated testing using Selenium & NUnitAutomated testing using Selenium & NUnit
Automated testing using Selenium & NUnit
 
What’s new in VS 2017?
What’s new in VS 2017?What’s new in VS 2017?
What’s new in VS 2017?
 
Software Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry PracticesSoftware Engineering - Trends & Industry Practices
Software Engineering - Trends & Industry Practices
 
Career Options for CS/IT/IS graduates
Career Options for CS/IT/IS graduatesCareer Options for CS/IT/IS graduates
Career Options for CS/IT/IS graduates
 
Software development fundamentals
Software development fundamentalsSoftware development fundamentals
Software development fundamentals
 
Introducing MS VS LightSwitch 2011
Introducing MS VS LightSwitch 2011Introducing MS VS LightSwitch 2011
Introducing MS VS LightSwitch 2011
 
Using xml in a data set (ado.net)
Using xml in a data set (ado.net)Using xml in a data set (ado.net)
Using xml in a data set (ado.net)
 

Recently uploaded

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 

Recently uploaded (20)

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

What's new in Angular 2?

  • 1. What’s new in Angular 2? A COMPARISON BETWEEN NG1.X AND NG2 Alfred Jett Grandeza Founder, Leangineer @ Lean Consulting leanconsulting.ph | ajgrandeza.com
  • 2. Lean Consulting • Davao based start-up • Founded: February 2016 • Lean Academy SOON! • More info: • leanconsulting.ph • fb.com/leanconsutling.ph
  • 3. About Me •Graduate of Ateneo de Davao, Computer Science 2012 •Over 5 years of software engineering experience, .NET and AngularJS •Former CTO of T.H.E. Patrons •Co-founder of Lean Consulting/Lean Academy •Microsoft Technology Associate (2) •Member of Davao .NET Community (Davao .NET Users Group, Philippine .NET Users Group) •I do consulting and freelance work from clients overseas •Advocate of .NET Technologies •I LOVE TO LEARN!
  • 4. Prerequisites & Tools • Required • JavaScript • HTML • CSS • Helpful • OOP concepts • Visual Studio Community • https://www.visualstudio.com/ • Visual Studio Code • https://code.visualstudio.com/
  • 5. Single Page Application • SPAs are web apps that load a single HTML page and dynamically that page as the user interacts • Much of the work happen in the client side • Usually written in JavaScript
  • 7. Angular is… • Open source, JavaScript based front-end framework • Used for building client-side applications • MVW Framework (Model-View-Whatever) • Mainly maintained by Google
  • 8. Why use Angular? • Expressive/Customizable HTML • Powerful Data Binding • Modular • Easy back-end integration
  • 9. Application Demo • NG 1.X App • NG 2 App
  • 10. Key Features of Angular 1.X • Directives • Data binding • Views • Controllers • $scope • Modules • Dependency Injection • Routes • Services
  • 11. What is a directive? • Extends HTML attributes, with the prefix “ng-” • Teaches HTML new tricks • There are built-in directives • ng-app • ng-view • You can also create your own custom directives
  • 12. Data Binding • Interpolation • {{name}} • Event Binding • ng-click=“onClick()” • Two-way Binding • <input ng-model=“name” />
  • 13. Filters & Pipes • Filters can be added to filter an array •Pipes can be used to format a data
  • 14. Views, Controllers, Scope •View – UI / Display •Controllers – Controls the logic, data and flow •$scope is the “glue” between controller and view or the ViewModel
  • 15. Modules & DI • A container for the different parts of your Angular app • You can package code as reusable modules • You may inject different modules to your module • Dependency Injection • Instantiate a module • ng-app=“” • Creating a module • angular.module(‘demoApp’, [])
  • 16. Routes • is used for deep-linking URLs to controllers and views
  • 17. Services • Are for organizing and share code across your application
  • 18. Summary for NG1 Key Features • Directives • Data binding • Views • Controllers • $scope • Modules • Dependency Injection • Routes • Services
  • 19. Angular 2.0 with TypeScript Live release: Sept 16, 2016 http://angularjs.blogspot.com/2016/09/angular2-final.html
  • 20. Why Angular 2? • Built for speed • Modern • Simplified API • Enhanced Productivity • Develop Across All Platforms
  • 21. What is TypeScript? • Open source programming language • Developed and maintained by Microsoft • A superset of JavaScript • Transpiles to plain JavaScript • Strongly typed • Class based / OOP approach • Learn more: • http://www.typescriptlang.org/Playground
  • 22. Setting up • Download • https://github.com/angular/quickstart
  • 23. Angular 2 Key Features • Components • Templates • Directives • Data Binding & Pipes • Life-cycle hooks • Services • Dependency Injection • Routes
  • 24. Anatomy of NG 2 Image grabbed from: https://www.pluralsight.com/courses/angular-2-getting-started
  • 25. Anatomy of a Component Image grabbed from: https://www.pluralsight.com/courses/angular-2-getting-started
  • 26. Components Image grabbed from: https://www.pluralsight.com/courses/angular-2-getting-started
  • 28. Decorator • A function that adds metadata to a class • Prefixed with an @ • @Component()
  • 29. Defining a Template in a Component • Inline template •Linked Template
  • 30. Data Binding • Coordinates communication between the component’s class and template • Interpolation • {{name}} • Event Binding • (click)=‘onClick()’ • Two-way Binding • <input [(ngModel)]=‘name’ /> • Property Binding • <img [src] = ‘customer.thumbnail’ />
  • 31. Directive in NG2 • Built-in directives • *ngIf • *ngFor
  • 32. Pipes • | lowercase • | currency • | uppercase • No more filter  • You have to create your own pipe
  • 33. Lifecycle Hooks • A component has a lifecycle • Angular offers component lifecycle hooks that give us ability to capture these moments • In other words, events • Samples • OnInit • OnChanges • OnDestory
  • 34. Services • Services are independent from any components • To provide shared data, logic across multiple components • Encapsulate external interactions (i.e. Rest API)
  • 36. Dependency Injection • A design pattern to resolve dependencies
  • 37. Retrieve Data using Http Returns Observables instead of Promises
  • 38. What is RxJS? • RxJS is a javascript library for composing asynchronous & event-based programs by using observable sequences • Used within Angular • More info • http://reactivex.io/rxjs/
  • 39. Promises vs Observable • Promise • Returns a single value • Not cancellable • Observable • Works with multiple values over time • Cancellable • “Retryable” • Supports map, filter, reduce, etc..
  • 41. Summary • Huge difference between NG1 & NG2, in terms of syntax • NG2 is simpler in terms of Architecture • TypeScript makes the job easier