SlideShare a Scribd company logo
Angular, the new AngularJS
By Matthew Gardner
Matthew Gardner
Frontend Developer
● Been with Kenzan for 4 years
● In free time I enjoy playing the guitar and listening to music
● Have been experimenting with Angular since RC stage
● Created a website for my mom in Angular v2
● Have been developing an Angular app using spotify API
Kenzan
▪ Full Service Consulting Firm
▪ Architecture, front and back end development, business analysis and DevTest.
▪ Cloud Virtualization Experts And Enablers
▪ AWS, Netflix stack, Kubernetes, Istio, enterprise architecture and beyond.
▪ DevOps Leadership
▪ Platform builds, continuous delivery and scalable resourcing.
What we will cover today
▪ Differences between Angular and AngularJS
▪ What is Angular?
▪ Core concepts of Angular
▪ Major changes from Angular v2 - v6
▪ Life cycle methods
▪ Brief overview of TypeScript
▪ Brief overview of RxJS
▪ Configuration to Angular
▪ Angular CLI
▪ What is next for Angular
▪ Demo of Angular spotify app and site for my mom
Examples of differences between
Angular and AngularJS
AngularJS vs Angular two way data binding
AngularJS Angular
https://codepen.io/mgarnder/pen/jpZGmP - AngularJs
https://codepen.io/mgarnder/pen/KBQXRM - Angular
AngularJS vs Angular Services
AngularJS Angular
https://codepen.io/mgarnder/pen/djdZvB - AngularJS
https://github.com/mrgardner/Angular2ServiceExample - Angular
AngularJS vs Angular Components
AngularJS Angular
https://codepen.io/mgarnder/pen/oMEqGr - AngularJS
https://codepen.io/mgarnder/pen/KBQoeQ - Angular
What is Angular?
What is Angular?
▪ A completely rewritten framework based on some of the concepts in AngularJS
▪ Does not include concept of “scope” or “controllers” instead it uses a hierarchy of
components
▪ Modularity
▪ Typescript
▪ Asynchronous template compilation
Main Features of Angular
▪ Cross Platform
▪ Speed and Performance
▪ Productivity
▪ Full Development story
Cross Platform
▪ Progressive Web Apps
▪ Allows developer to use modern web platforms to deliver an app-like experience
▪ Native
▪ Build native mobile apps with strategies from Cordova, Ionic, or NativeScript
▪ Desktop
▪ Create desktop app on Mac, Windows, and Linux
Speed and Performance
▪ Code Generation
▪ Angular turns the templates into highly optimized Javascript code
▪ Universal
▪ Serve the first view of your app on Node.JS, .NET, PHP, and other servers
▪ Code Splitting
▪ Angular apps load quicker with new Component Router which only loads code required to
render
Productivity
▪ Templates
▪ Create UI views with ease
▪ Angular CLI
▪ Command line tool that allows you to create your app, create components, test, and serve
your app
▪ IDEs
▪ Code completion, error messages, and other feedback from popular editors
Full Development Story
▪ Testing
▪ Has Karma built into framework for Unit tests and Protractor for End to End tests
▪ Animation
▪ Angular library that allows you to add simple or complex animation to your app
▪ Accessibility
▪ Create accessible apps with AIRA-enabled components, developer guides, and built-in a11y
test infrastructure
Core Concepts of Angular
What is two way data binding
▪ When properties in the model gets updated it is also updated in the UI
▪ When the UI gets updated, the changes get propagated back to the model
▪ One of the biggest features in Angular and AngularJS
Example of two way data binding
Ng template
▪ Is an Angular template
▪ Is used in Angular under the hood when using
▪ *ngFor
▪ *ngIf
▪ *ngSwitch
▪ Can use ng container to attach a structural directive to a section of the page, without
having to create an extra element just for that.
Ng template Example
Guards
▪ Part of Angular Router package
▪ Navigation guard to protect routes
▪ Four types of guards
▪ CanActivate
▪ Whether of not the route can be activated
▪ CanActivateChild
▪ Whether of not the child route can be activated
▪ CanDeactivate
▪ Whether or not the route can be deactivated
▪ CanLoad
▪ Whether or not the route can be loaded
Guard Example
https://github.com/mrgardner/AngularGuardExample
Event Emitters
▪ Can emit custom events synchronously or asynchronously
▪ When event is emitted it returns an Observable
▪ Get the value from the event emitter by subscribing to the instance
Event Emitter Example
https://github.com/mrgardner/CustomCounter
Major changes from Angular v2-v6
Major changes from v2-v6
▪ Updates to work with new versions of TypeScript
▪ Creation of new view engine
▪ Improved file sizes and application speeds
▪ Moving from SystemJS to Webpack
Major changes in v6
▪ Angular Elements Support
▪ Allows the developer to create and angular component as a web component that can be
used in any application without the angular framework
▪ Service Worker Support
▪ Support was first introduced in v5 but in v6 it ships with more bug fixes and the
configuration of navigation URLs within service workers
▪ <template> was replaced with <ng-template>
▪ I18n
▪ Runtime rendering so you do not have to build one application per locale
▪ Introduced third rendering engine Ivy
▪ Can test out the ivy engine with v6
▪ Should have a more complete version in next major release
▪ ngModelChanges
▪ Values are now emitted after the value is updated from the form control
Major changes in v6
▪ Bazel Compiler Support
▪ A tool that automates software builds and tests
▪ Similar to other tools such as Make, Ant, Maven, Gradle, and more
▪ RxJS 6.0 support
▪ Tree shaking
▪ New way to define an injectable service directly in the @Injectable decorator by adding
providedIn: ‘root’
▪ Webpack v4
Life cycle methods
Lifecycle methods
▪ ngOnChanges()
▪ Called when Angular set data-bound input properties
▪ ngOnInit()
▪ Called after Angular first displays data-bound properties
▪ ngDoCheck()
▪ Act and detect changes in Angular that won’t act upon on its own
▪ ngAfterContentInit()
▪ Called after components view is ready
Lifecycle methods Con’t
▪ ngAfterContentChecked()
▪ Called after Angular checks content projected onto view
▪ ngAfterViewInit()
▪ Called after component and child view are intialized
▪ ngAfterViewChecked()
▪ Called after component and child views are checked
▪ ngOnDestroy()
▪ Called just before Angular destroys the component or directive
Overview of TypeScript
What is TypeScript
▪ Developed by Microsoft
▪ A typed superset of Javascript that compiles into plain Javascript
▪ Allows developers to add types to variables
▪ Such as defining a variable to be of type string, array, object, boolean, number, etc
TypeScript Examples
Good Bad
Overview of RxJS
Observables (RxJS)
▪ Reactive Extensions for JavaScript (RxJS)
▪ Allow you to work with asynchronous data streams
▪ Asynchronous - when you call a function and is notified with a callback when results are
available
▪ Data - information that could be numbers, strings, or objects
▪ Streams - sequences of data that are made available over time
▪ You represent asynchronous data streams using observable sequences
Observables Examples
Angular Configuration
Angular Configurations
▪ Angular.json is the configuration file
▪ Add third part styles, scripts, and assets
▪ Testing
▪ Linting
Angular CLI
Angular CLI
▪ A command line interface that scaffolds and builds Angular apps
▪ Can be used to create
▪ Apps
▪ Components
▪ Services
▪ Guards
▪ Pipes
▪ And more
How to use Angular CLI
▪ First you need to install Angular CLI with npm install -g @angular/cli
▪ Now to use Angular CLI
▪ ng new <app-name>
▪ ng g component <component-name>
▪ ng g service <service-name>
▪ ng g guard <guard-name>
▪ ng g pipe <pipe-name>
Example output for creating a new app
Example output for creating a pipe
What is next for Angular?
What is next for Angular
▪ The Angular team is currently working on the third render engine Ivy
▪ Ivy uses two major concepts:
1. Tree Shaking
a. Removes unused code to result in smaller bundles and faster load times
2. Locality
a. Compiles one file at a time
b. It only looks at a component and its template not its dependencies
Demos
Demos
▪ Angular v2 App that I made for my mom when she was running for town council
▪ Angular v6 app that I have been working on that uses the Spotify API
▪ Created own shuffler
▪ Created filter to detect and remove duplicate tracks
▪ Able to play full-length spotify tracks in the browser with Spotify’s playback SDK
Topics We have covered
▪ Differences between Angular and AngularJS
▪ What is Angular?
▪ Core concepts of Angular
▪ Major changes from Angular v2 - v6
▪ Life cycle methods
▪ Brief overview of TypeScript
▪ Brief overview of RxJS
▪ Configuration to Angular
▪ Angular CLI
▪ What is next for Angular
▪ Demo of Angular spotify app and site for my mom
Questions?
50
Social Media
Kenzan Personal
Twitter
Website
Linkedin
Github
Email - matthew.gardner.mrg@gmail.com
Resources
▪ https://angular.io/
▪ https://www.typescriptlang.org/
▪ http://es6-features.org/#Constants
▪ https://www.learnrxjs.io/
▪ https://bazel.build/
Codepen links
▪ https://codepen.io/mgarnder/pen/jpZGmP
▪ AngularJS two way data binding example
▪ https://codepen.io/mgarnder/pen/KBQXRM
▪ Angular two way data binding example
▪ https://codepen.io/mgarnder/pen/djdZvB
▪ AngularJS service example
▪ https://github.com/mrgardner/Angular2ServiceExample
▪ Angular service example
Codepen links Con’t
▪ https://codepen.io/mgarnder/pen/oMEqGr
▪ AngularJS component example
▪ https://codepen.io/mgarnder/pen/KBQoeQ
▪ Angular component example
▪ https://github.com/mrgardner/CustomCounter
▪ Angular event emitter example
▪ https://github.com/mrgardner/AngularGuardExample
▪ Angular guard example

More Related Content

PDF
Angular Meetup 1 - Angular Basics and Workshop
Nitin Bhojwani
 
PDF
Angular 2 Training | Angular 2 Tutorial For Beginners | Angular Certification...
Edureka!
 
PDF
Angular 4 Tutorial | What's New In Angular 4 | Angular Training | Edureka
Edureka!
 
PDF
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
Edureka!
 
PDF
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Edureka!
 
ODP
Angular 6 - The Complete Guide
Sam Dias
 
PPSX
Angular 4 fronts
badal dubla
 
PDF
What angular 13 will bring to the table
Moon Technolabs Pvt. Ltd.
 
Angular Meetup 1 - Angular Basics and Workshop
Nitin Bhojwani
 
Angular 2 Training | Angular 2 Tutorial For Beginners | Angular Certification...
Edureka!
 
Angular 4 Tutorial | What's New In Angular 4 | Angular Training | Edureka
Edureka!
 
What Is Angular 2 | Angular 2 Tutorial For Beginners | Angular Training | Edu...
Edureka!
 
Angular Routing Tutorial | AngularJS vs Angular Router | Angular Training | E...
Edureka!
 
Angular 6 - The Complete Guide
Sam Dias
 
Angular 4 fronts
badal dubla
 
What angular 13 will bring to the table
Moon Technolabs Pvt. Ltd.
 

What's hot (20)

PPTX
Go live with angular 4
Indra Gunawan
 
PPTX
Talk for DevFest 2021 - GDG Bénin
Ezéchiel Amen AGBLA
 
PDF
What's New in Angular 4 | Angular 4 Features | Angular 4 Changes | Angular Tu...
Edureka!
 
PPTX
Angular 4 Introduction Tutorial
Scott Lee
 
PDF
Mastering angular - Dot Net Tricks
Gaurav Singh
 
PDF
Developing a Demo Application with Angular 4 - J2I
Nader Debbabi
 
PDF
Meetup SkillValue - Angular 6 : Bien démarrer son application
Thibault Even
 
PDF
Angular Directives | Angular 2 Custom Directives | Angular Tutorial | Angular...
Edureka!
 
PPTX
An Overview of Angular 4
Cynoteck Technology Solutions Private Limited
 
PPT
Angular App Presentation
Elizabeth Long
 
PPTX
Angular 9
Raja Vishnu
 
PDF
Introduction to angular 4
Marwane El Azami
 
PDF
Angular 2 - Core Concepts
Fabio Biondi
 
PPTX
Angular 2
Nigam Goyal
 
PPTX
Angular 9 New features
Ahmed Bouchefra
 
PDF
Angular meetup 2 2019-08-29
Nitin Bhojwani
 
PPTX
Angular 2
Travis van der Font
 
PDF
Angular 10 course_content
NAVEENSAGGAM1
 
PDF
Introduction to angular 2
Dhyego Fernando
 
PPTX
Lecture 32
Jannat Khan
 
Go live with angular 4
Indra Gunawan
 
Talk for DevFest 2021 - GDG Bénin
Ezéchiel Amen AGBLA
 
What's New in Angular 4 | Angular 4 Features | Angular 4 Changes | Angular Tu...
Edureka!
 
Angular 4 Introduction Tutorial
Scott Lee
 
Mastering angular - Dot Net Tricks
Gaurav Singh
 
Developing a Demo Application with Angular 4 - J2I
Nader Debbabi
 
Meetup SkillValue - Angular 6 : Bien démarrer son application
Thibault Even
 
Angular Directives | Angular 2 Custom Directives | Angular Tutorial | Angular...
Edureka!
 
Angular App Presentation
Elizabeth Long
 
Angular 9
Raja Vishnu
 
Introduction to angular 4
Marwane El Azami
 
Angular 2 - Core Concepts
Fabio Biondi
 
Angular 2
Nigam Goyal
 
Angular 9 New features
Ahmed Bouchefra
 
Angular meetup 2 2019-08-29
Nitin Bhojwani
 
Angular 10 course_content
NAVEENSAGGAM1
 
Introduction to angular 2
Dhyego Fernando
 
Lecture 32
Jannat Khan
 
Ad

Similar to Angular, the New Angular JS (20)

PPTX
Why choose Angular 6?
Priyanka Verma
 
PDF
Evolution and History of Angular as Web Development Platform.pdf
iFour Technolab Pvt. Ltd.
 
PPTX
What’s New in Angular 15.pptx
Albiorix Technology
 
PPTX
THE FUTURE OF ANGULAR JS
IT Outsourcing China
 
PPTX
Module 1.pptx Angular JS FRAMEWORK WEBDEVELOPMENT
raman76530
 
PDF
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
Alex Ershov
 
PDF
Introduction to Angular 2
Naveen Pete
 
PPTX
What is Angular Ivy?
Albiorix Technology
 
PPTX
Getting Started With AngularJS
Omnia Helmi
 
PDF
AzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
JSC “Arcadia Inc”
 
PPTX
Angular 2.0
Mallikarjuna G D
 
PDF
Where and Why Use Angular for Web Development?
1221 North Church Street, Suite 202 Moorestown, NJ 08057
 
PPTX
Angular vs react
Infinijith Technologies
 
PDF
Learn Angular 9/8 In Easy Steps
Ahmed Bouchefra
 
PPTX
Angular2.0@Shanghai0319
Bibby Chung
 
PDF
Angular - Chapter 1 - Introduction
WebStackAcademy
 
PDF
End to-End SPA Development Using ASP.NET and AngularJS
Gil Fink
 
PPTX
Introduction to angular with a simple but complete project
Jadson Santos
 
PDF
Top Features And Updates Of Angular 13 You Must Know
Andolasoft Inc
 
PPTX
AngularJS Introduction (Talk given on Aug 5 2013)
Abhishek Anand
 
Why choose Angular 6?
Priyanka Verma
 
Evolution and History of Angular as Web Development Platform.pdf
iFour Technolab Pvt. Ltd.
 
What’s New in Angular 15.pptx
Albiorix Technology
 
THE FUTURE OF ANGULAR JS
IT Outsourcing China
 
Module 1.pptx Angular JS FRAMEWORK WEBDEVELOPMENT
raman76530
 
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
Alex Ershov
 
Introduction to Angular 2
Naveen Pete
 
What is Angular Ivy?
Albiorix Technology
 
Getting Started With AngularJS
Omnia Helmi
 
AzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
JSC “Arcadia Inc”
 
Angular 2.0
Mallikarjuna G D
 
Where and Why Use Angular for Web Development?
1221 North Church Street, Suite 202 Moorestown, NJ 08057
 
Angular vs react
Infinijith Technologies
 
Learn Angular 9/8 In Easy Steps
Ahmed Bouchefra
 
Angular2.0@Shanghai0319
Bibby Chung
 
Angular - Chapter 1 - Introduction
WebStackAcademy
 
End to-End SPA Development Using ASP.NET and AngularJS
Gil Fink
 
Introduction to angular with a simple but complete project
Jadson Santos
 
Top Features And Updates Of Angular 13 You Must Know
Andolasoft Inc
 
AngularJS Introduction (Talk given on Aug 5 2013)
Abhishek Anand
 
Ad

Recently uploaded (20)

PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Doc9.....................................
SofiaCollazos
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Doc9.....................................
SofiaCollazos
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 

Angular, the New Angular JS

  • 1. Angular, the new AngularJS By Matthew Gardner
  • 2. Matthew Gardner Frontend Developer ● Been with Kenzan for 4 years ● In free time I enjoy playing the guitar and listening to music ● Have been experimenting with Angular since RC stage ● Created a website for my mom in Angular v2 ● Have been developing an Angular app using spotify API
  • 3. Kenzan ▪ Full Service Consulting Firm ▪ Architecture, front and back end development, business analysis and DevTest. ▪ Cloud Virtualization Experts And Enablers ▪ AWS, Netflix stack, Kubernetes, Istio, enterprise architecture and beyond. ▪ DevOps Leadership ▪ Platform builds, continuous delivery and scalable resourcing.
  • 4. What we will cover today ▪ Differences between Angular and AngularJS ▪ What is Angular? ▪ Core concepts of Angular ▪ Major changes from Angular v2 - v6 ▪ Life cycle methods ▪ Brief overview of TypeScript ▪ Brief overview of RxJS ▪ Configuration to Angular ▪ Angular CLI ▪ What is next for Angular ▪ Demo of Angular spotify app and site for my mom
  • 5. Examples of differences between Angular and AngularJS
  • 6. AngularJS vs Angular two way data binding AngularJS Angular https://codepen.io/mgarnder/pen/jpZGmP - AngularJs https://codepen.io/mgarnder/pen/KBQXRM - Angular
  • 7. AngularJS vs Angular Services AngularJS Angular https://codepen.io/mgarnder/pen/djdZvB - AngularJS https://github.com/mrgardner/Angular2ServiceExample - Angular
  • 8. AngularJS vs Angular Components AngularJS Angular https://codepen.io/mgarnder/pen/oMEqGr - AngularJS https://codepen.io/mgarnder/pen/KBQoeQ - Angular
  • 10. What is Angular? ▪ A completely rewritten framework based on some of the concepts in AngularJS ▪ Does not include concept of “scope” or “controllers” instead it uses a hierarchy of components ▪ Modularity ▪ Typescript ▪ Asynchronous template compilation
  • 11. Main Features of Angular ▪ Cross Platform ▪ Speed and Performance ▪ Productivity ▪ Full Development story
  • 12. Cross Platform ▪ Progressive Web Apps ▪ Allows developer to use modern web platforms to deliver an app-like experience ▪ Native ▪ Build native mobile apps with strategies from Cordova, Ionic, or NativeScript ▪ Desktop ▪ Create desktop app on Mac, Windows, and Linux
  • 13. Speed and Performance ▪ Code Generation ▪ Angular turns the templates into highly optimized Javascript code ▪ Universal ▪ Serve the first view of your app on Node.JS, .NET, PHP, and other servers ▪ Code Splitting ▪ Angular apps load quicker with new Component Router which only loads code required to render
  • 14. Productivity ▪ Templates ▪ Create UI views with ease ▪ Angular CLI ▪ Command line tool that allows you to create your app, create components, test, and serve your app ▪ IDEs ▪ Code completion, error messages, and other feedback from popular editors
  • 15. Full Development Story ▪ Testing ▪ Has Karma built into framework for Unit tests and Protractor for End to End tests ▪ Animation ▪ Angular library that allows you to add simple or complex animation to your app ▪ Accessibility ▪ Create accessible apps with AIRA-enabled components, developer guides, and built-in a11y test infrastructure
  • 16. Core Concepts of Angular
  • 17. What is two way data binding ▪ When properties in the model gets updated it is also updated in the UI ▪ When the UI gets updated, the changes get propagated back to the model ▪ One of the biggest features in Angular and AngularJS
  • 18. Example of two way data binding
  • 19. Ng template ▪ Is an Angular template ▪ Is used in Angular under the hood when using ▪ *ngFor ▪ *ngIf ▪ *ngSwitch ▪ Can use ng container to attach a structural directive to a section of the page, without having to create an extra element just for that.
  • 21. Guards ▪ Part of Angular Router package ▪ Navigation guard to protect routes ▪ Four types of guards ▪ CanActivate ▪ Whether of not the route can be activated ▪ CanActivateChild ▪ Whether of not the child route can be activated ▪ CanDeactivate ▪ Whether or not the route can be deactivated ▪ CanLoad ▪ Whether or not the route can be loaded
  • 23. Event Emitters ▪ Can emit custom events synchronously or asynchronously ▪ When event is emitted it returns an Observable ▪ Get the value from the event emitter by subscribing to the instance
  • 25. Major changes from Angular v2-v6
  • 26. Major changes from v2-v6 ▪ Updates to work with new versions of TypeScript ▪ Creation of new view engine ▪ Improved file sizes and application speeds ▪ Moving from SystemJS to Webpack
  • 27. Major changes in v6 ▪ Angular Elements Support ▪ Allows the developer to create and angular component as a web component that can be used in any application without the angular framework ▪ Service Worker Support ▪ Support was first introduced in v5 but in v6 it ships with more bug fixes and the configuration of navigation URLs within service workers ▪ <template> was replaced with <ng-template> ▪ I18n ▪ Runtime rendering so you do not have to build one application per locale ▪ Introduced third rendering engine Ivy ▪ Can test out the ivy engine with v6 ▪ Should have a more complete version in next major release ▪ ngModelChanges ▪ Values are now emitted after the value is updated from the form control
  • 28. Major changes in v6 ▪ Bazel Compiler Support ▪ A tool that automates software builds and tests ▪ Similar to other tools such as Make, Ant, Maven, Gradle, and more ▪ RxJS 6.0 support ▪ Tree shaking ▪ New way to define an injectable service directly in the @Injectable decorator by adding providedIn: ‘root’ ▪ Webpack v4
  • 30. Lifecycle methods ▪ ngOnChanges() ▪ Called when Angular set data-bound input properties ▪ ngOnInit() ▪ Called after Angular first displays data-bound properties ▪ ngDoCheck() ▪ Act and detect changes in Angular that won’t act upon on its own ▪ ngAfterContentInit() ▪ Called after components view is ready
  • 31. Lifecycle methods Con’t ▪ ngAfterContentChecked() ▪ Called after Angular checks content projected onto view ▪ ngAfterViewInit() ▪ Called after component and child view are intialized ▪ ngAfterViewChecked() ▪ Called after component and child views are checked ▪ ngOnDestroy() ▪ Called just before Angular destroys the component or directive
  • 33. What is TypeScript ▪ Developed by Microsoft ▪ A typed superset of Javascript that compiles into plain Javascript ▪ Allows developers to add types to variables ▪ Such as defining a variable to be of type string, array, object, boolean, number, etc
  • 36. Observables (RxJS) ▪ Reactive Extensions for JavaScript (RxJS) ▪ Allow you to work with asynchronous data streams ▪ Asynchronous - when you call a function and is notified with a callback when results are available ▪ Data - information that could be numbers, strings, or objects ▪ Streams - sequences of data that are made available over time ▪ You represent asynchronous data streams using observable sequences
  • 39. Angular Configurations ▪ Angular.json is the configuration file ▪ Add third part styles, scripts, and assets ▪ Testing ▪ Linting
  • 41. Angular CLI ▪ A command line interface that scaffolds and builds Angular apps ▪ Can be used to create ▪ Apps ▪ Components ▪ Services ▪ Guards ▪ Pipes ▪ And more
  • 42. How to use Angular CLI ▪ First you need to install Angular CLI with npm install -g @angular/cli ▪ Now to use Angular CLI ▪ ng new <app-name> ▪ ng g component <component-name> ▪ ng g service <service-name> ▪ ng g guard <guard-name> ▪ ng g pipe <pipe-name>
  • 43. Example output for creating a new app
  • 44. Example output for creating a pipe
  • 45. What is next for Angular?
  • 46. What is next for Angular ▪ The Angular team is currently working on the third render engine Ivy ▪ Ivy uses two major concepts: 1. Tree Shaking a. Removes unused code to result in smaller bundles and faster load times 2. Locality a. Compiles one file at a time b. It only looks at a component and its template not its dependencies
  • 47. Demos
  • 48. Demos ▪ Angular v2 App that I made for my mom when she was running for town council ▪ Angular v6 app that I have been working on that uses the Spotify API ▪ Created own shuffler ▪ Created filter to detect and remove duplicate tracks ▪ Able to play full-length spotify tracks in the browser with Spotify’s playback SDK
  • 49. Topics We have covered ▪ Differences between Angular and AngularJS ▪ What is Angular? ▪ Core concepts of Angular ▪ Major changes from Angular v2 - v6 ▪ Life cycle methods ▪ Brief overview of TypeScript ▪ Brief overview of RxJS ▪ Configuration to Angular ▪ Angular CLI ▪ What is next for Angular ▪ Demo of Angular spotify app and site for my mom
  • 52. Resources ▪ https://angular.io/ ▪ https://www.typescriptlang.org/ ▪ http://es6-features.org/#Constants ▪ https://www.learnrxjs.io/ ▪ https://bazel.build/
  • 53. Codepen links ▪ https://codepen.io/mgarnder/pen/jpZGmP ▪ AngularJS two way data binding example ▪ https://codepen.io/mgarnder/pen/KBQXRM ▪ Angular two way data binding example ▪ https://codepen.io/mgarnder/pen/djdZvB ▪ AngularJS service example ▪ https://github.com/mrgardner/Angular2ServiceExample ▪ Angular service example
  • 54. Codepen links Con’t ▪ https://codepen.io/mgarnder/pen/oMEqGr ▪ AngularJS component example ▪ https://codepen.io/mgarnder/pen/KBQoeQ ▪ Angular component example ▪ https://github.com/mrgardner/CustomCounter ▪ Angular event emitter example ▪ https://github.com/mrgardner/AngularGuardExample ▪ Angular guard example