Presentation
on
Angular
By: Ramesh Adhikari
1
Introduction of angular
● Google’s popular and open-source JavaScript framework
● building and developing single-page mobile and desktop applications
● Angular 5 was announced to the users on 1st November 2017.
● Angular 5 is focused on making the Angular applications smaller, faster
and easier to use.
2
Angular CLI
● Ng generate component component_name (to generate component)
● Ng generate service servic_name (to generate service)
● Ng generate class class_name (to create class to specify attribute)
● npm install -g @angular/cli (install the Angular CLI globally.)
● ng new project_name (Generate a new project )
● ng serve --open (launches the server)
3
Architecture and Concepts
seven main building blocks of an Angular Application.
1. Component
2. Templates
3. Metadata
4. Data Binding
5. Directives
6. Services
7. Dependency Injection
4
Basic Architecture
5
Components● the main building block of an Angular Application
● contains the definition of the View and the data that defines how the View
looks and behaves
● Component passes the data to the view using a process called Data Binding
● Parent child component
6
Component Communication
● The Parent Component communicates with the child component using
the @Input Annotation.
● The child components detect changes to these Input properties using
OnChanges life Cycle hook or with a Property Setter.
● The child component can communicate with the parent by raising an
event, which the parent can listen
Passing data to child component /Passing Data to Parent Component
7
Component Life Cycle Hook
● OnInit
● OnDestroy
● Onchanges
● DoCheck
8
Data Binding in Angular
There are four ways you can bind data in Angular
1. Interpolation
2. Property Binding
3. Event Binding
4. Two Way Binding
9
Directives
The Angular directive helps us to manipulate the DOM.
● ngFor
● ngSwitch Directive
● ngIf Directive
● ngClass Directive
● ngStyle Directive
10
Pipes
pipes are used to Transform the Data. For Example, the Date pipe formats
the date according to locale rules.
● Angular Pipes
● Angular Custom Pipes
Pipes provided by Angular
CurrencyPipe, DatePipe , DecimalPipe, JsonPipe, LowerCasePipe
,UpperCasePipe, , PercentPipe, SlicePipe , AsyncPipe
11
Forms
● Template driven forms(ngForm)
● Reactive form
12
Services & Dependency Injection
● Services allow us to create a reusable code and use it every component
that needs it.
● The dependencies are declared in the Module using the Providers
metadata
13
Httpclient module
● The newly designed HttpClient Module allows us to query the Remote
API source to get data into our Application
● It requires us to Subscribe to the returned response using RxJs
observables.
14
Http Example (with retry())
getConfig() {
return this.http.get<Config>(this.configUrl)
.pipe(
retry(3), // retry a failed request up to 3 times
catchError(this.handleError) // then handle the error
);
} 15
Router
❖ The Router module handles the navigation & Routing in Angular
❖ The Routing allows us to move from one part of the application to
another part or one View to another View
A typical Angular Route has two properties:
● path: a string that matches the URL in the browser address bar.
● component: the component that the router should create when
navigating to this route.
16
Middleware/ Guard in Angular
● CanActivate (Checks to see if a user can visit a route)
● CanActivateChild (Checks to see if a user can visit a routes
children)
● CanDeactivate (Checks to see if a user can exit a route)
17
Lazy load module in angular
There are three main steps to setting up a lazy loaded feature module:
● Create the feature module.
● Create the feature module’s routing module.
● Configure the routes.
Each feature module acts as a doorway via the router, the lazy loading
syntax uses loadChildren followed by a string that is the path to the module,
a hash mark or #, and the module’s class name. forRoot() and forChild()
18
Structure of project
● feature module,
● shared module,
● core module
19
ControlValueAccessor
If you’re working on a complex project inevitably you will face the situation when you have to create a
custom form control. The essential component of this task will be implementing ControlValueAccessor
interface ControlValueAccessor{
writeValue(obj: any): void
registerOnChange(fn: any): void
registerOnTouched(fn: any): void
setDisabledState(isDisabled: boolean)?: void
} 20
OAuth 2.0 Grants
1. Resource owner credentials grant
Allow to request tokens on behalf of user by sending the username and password to the
token end points.
1. Authorisation Code Grant
The authorization code grant should be very familiar if you’ve ever
signed into an application using your Facebook or Google account.
3 Client credentials grant
this grant is suitable for machine-to-machine authentication where a
specific user’s permission to access data is not required.
21
4. Implicit grant
similar to the authorization code grant with two distinct differences.
● single page web apps that can’t keep a client secret because all of the
application code and storage is easily accessible
● the authorization server returns an access token instead of
authorization code
5. Refresh token grant
Access tokens eventually expire; however some grants respond with a refresh token which
enables the client to get a new access token without requiring the user to be redirected. 22
Thank
You !
Any Questions ?
23

More Related Content

PDF
Angular 2 - Core Concepts
DOCX
Best Angular JS training in Hyderabad, India
PDF
Introduction to AngularJS
DOCX
Angular 4 Training | Angular Js training in Hyderabad
ODP
When Camel meets CDI
PDF
Cleaning up Sitecore Controllers
PPTX
Angular 1.x vs 2 - In code level
ODP
Microservices in a netshell
Angular 2 - Core Concepts
Best Angular JS training in Hyderabad, India
Introduction to AngularJS
Angular 4 Training | Angular Js training in Hyderabad
When Camel meets CDI
Cleaning up Sitecore Controllers
Angular 1.x vs 2 - In code level
Microservices in a netshell

What's hot (20)

PDF
AngularJS Workshop
PPTX
Angular 1.x in action now
PPTX
Angular 2.0
PDF
Best Practices in Qt Quick/QML - Part III
 
PPTX
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
 
PDF
Design Summit - Automate roadmap - Madhu Kanoor
PPTX
Angular 2 and Wijmo 5 - GrapeCity Echo 2016 Tokyo
PPTX
Angular 4
PPTX
Angular js- 1.X
PPTX
Vue.js Use Cases
PDF
How to create an Angular builder
PDF
Angular 2 overview
PDF
Introduction to Angular 2
PDF
AngularJS Basics
PDF
What angular 13 will bring to the table
PDF
Angular Weekend
PDF
Angular 2 Crash Course
PDF
Express: A Jump-Start
PDF
Migrating to Angular 2
PPTX
AngularJS
AngularJS Workshop
Angular 1.x in action now
Angular 2.0
Best Practices in Qt Quick/QML - Part III
 
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
 
Design Summit - Automate roadmap - Madhu Kanoor
Angular 2 and Wijmo 5 - GrapeCity Echo 2016 Tokyo
Angular 4
Angular js- 1.X
Vue.js Use Cases
How to create an Angular builder
Angular 2 overview
Introduction to Angular 2
AngularJS Basics
What angular 13 will bring to the table
Angular Weekend
Angular 2 Crash Course
Express: A Jump-Start
Migrating to Angular 2
AngularJS
Ad

Similar to Presentation on angular 5 (20)

PPTX
Angular 18 course for begineers and experienced
PDF
Angular 2 overview in 60 minutes
PPTX
Introduction to angular | Concepts and Environment setup
PDF
Angular js
PDF
Angular js
PPTX
Angular crash course
PDF
Angular training-course-syllabus
PDF
Infosys Angular Interview Questions PDF By ScholarHat
PDF
Angular Project Report
PPTX
Angular interview questions
PDF
Angular2 with type script
ODP
Angular 6 - The Complete Guide
PDF
Angular 7 training_topics
PDF
Angular training-course-syllabus
PPTX
Intro to AngularJs
PDF
Download full ebook of Angular 2 Cookbook Frisbie instant download pdf
PPTX
Fly High With Angular - How to build an app using Angular
PPTX
Angular
PPTX
AngularJS
PDF
Angular Advanced Workshop (+ Challenges)
Angular 18 course for begineers and experienced
Angular 2 overview in 60 minutes
Introduction to angular | Concepts and Environment setup
Angular js
Angular js
Angular crash course
Angular training-course-syllabus
Infosys Angular Interview Questions PDF By ScholarHat
Angular Project Report
Angular interview questions
Angular2 with type script
Angular 6 - The Complete Guide
Angular 7 training_topics
Angular training-course-syllabus
Intro to AngularJs
Download full ebook of Angular 2 Cookbook Frisbie instant download pdf
Fly High With Angular - How to build an app using Angular
Angular
AngularJS
Angular Advanced Workshop (+ Challenges)
Ad

Recently uploaded (20)

PDF
Optimizing bioinformatics applications: a novel approach with human protein d...
PPTX
From XAI to XEE through Influence and Provenance.Controlling model fairness o...
PDF
【AI論文解説】高速・高品質な生成を実現するFlow Map Models(Part 1~3)
PPTX
Presentation - Principles of Instructional Design.pptx
PDF
Introduction to c language from lecture slides
PDF
Fitaura: AI & Machine Learning Powered Fitness Tracker
PDF
FASHION-DRIVEN TEXTILES AS A CRYSTAL OF A NEW STREAM FOR STAKEHOLDER CAPITALI...
PDF
Addressing the challenges of harmonizing law and artificial intelligence tech...
PDF
Slides World Game (s) Great Redesign Eco Economic Epochs.pdf
PDF
Ebook - The Future of AI A Comprehensive Guide.pdf
PDF
TrustArc Webinar - Data Minimization in Practice_ Reducing Risk, Enhancing Co...
PPT
Overviiew on Intellectual property right
PPTX
CRM(Customer Relationship Managmnet) Presentation
PPTX
Information-Technology-in-Human-Society.pptx
PPTX
Slides World Game (s) Great Redesign Eco Economic Epochs.pptx
PDF
Secure Java Applications against Quantum Threats
PDF
ELLIE29.pdfWETWETAWTAWETAETAETERTRTERTER
PPTX
Blending method and technology for hydrogen.pptx
PDF
The Digital Engine Room: Unlocking APAC’s Economic and Digital Potential thro...
PDF
1_Keynote_Breaking Barriers_한계를 넘어서_Charith Mendis.pdf
Optimizing bioinformatics applications: a novel approach with human protein d...
From XAI to XEE through Influence and Provenance.Controlling model fairness o...
【AI論文解説】高速・高品質な生成を実現するFlow Map Models(Part 1~3)
Presentation - Principles of Instructional Design.pptx
Introduction to c language from lecture slides
Fitaura: AI & Machine Learning Powered Fitness Tracker
FASHION-DRIVEN TEXTILES AS A CRYSTAL OF A NEW STREAM FOR STAKEHOLDER CAPITALI...
Addressing the challenges of harmonizing law and artificial intelligence tech...
Slides World Game (s) Great Redesign Eco Economic Epochs.pdf
Ebook - The Future of AI A Comprehensive Guide.pdf
TrustArc Webinar - Data Minimization in Practice_ Reducing Risk, Enhancing Co...
Overviiew on Intellectual property right
CRM(Customer Relationship Managmnet) Presentation
Information-Technology-in-Human-Society.pptx
Slides World Game (s) Great Redesign Eco Economic Epochs.pptx
Secure Java Applications against Quantum Threats
ELLIE29.pdfWETWETAWTAWETAETAETERTRTERTER
Blending method and technology for hydrogen.pptx
The Digital Engine Room: Unlocking APAC’s Economic and Digital Potential thro...
1_Keynote_Breaking Barriers_한계를 넘어서_Charith Mendis.pdf

Presentation on angular 5

  • 2. Introduction of angular ● Google’s popular and open-source JavaScript framework ● building and developing single-page mobile and desktop applications ● Angular 5 was announced to the users on 1st November 2017. ● Angular 5 is focused on making the Angular applications smaller, faster and easier to use. 2
  • 3. Angular CLI ● Ng generate component component_name (to generate component) ● Ng generate service servic_name (to generate service) ● Ng generate class class_name (to create class to specify attribute) ● npm install -g @angular/cli (install the Angular CLI globally.) ● ng new project_name (Generate a new project ) ● ng serve --open (launches the server) 3
  • 4. Architecture and Concepts seven main building blocks of an Angular Application. 1. Component 2. Templates 3. Metadata 4. Data Binding 5. Directives 6. Services 7. Dependency Injection 4
  • 6. Components● the main building block of an Angular Application ● contains the definition of the View and the data that defines how the View looks and behaves ● Component passes the data to the view using a process called Data Binding ● Parent child component 6
  • 7. Component Communication ● The Parent Component communicates with the child component using the @Input Annotation. ● The child components detect changes to these Input properties using OnChanges life Cycle hook or with a Property Setter. ● The child component can communicate with the parent by raising an event, which the parent can listen Passing data to child component /Passing Data to Parent Component 7
  • 8. Component Life Cycle Hook ● OnInit ● OnDestroy ● Onchanges ● DoCheck 8
  • 9. Data Binding in Angular There are four ways you can bind data in Angular 1. Interpolation 2. Property Binding 3. Event Binding 4. Two Way Binding 9
  • 10. Directives The Angular directive helps us to manipulate the DOM. ● ngFor ● ngSwitch Directive ● ngIf Directive ● ngClass Directive ● ngStyle Directive 10
  • 11. Pipes pipes are used to Transform the Data. For Example, the Date pipe formats the date according to locale rules. ● Angular Pipes ● Angular Custom Pipes Pipes provided by Angular CurrencyPipe, DatePipe , DecimalPipe, JsonPipe, LowerCasePipe ,UpperCasePipe, , PercentPipe, SlicePipe , AsyncPipe 11
  • 12. Forms ● Template driven forms(ngForm) ● Reactive form 12
  • 13. Services & Dependency Injection ● Services allow us to create a reusable code and use it every component that needs it. ● The dependencies are declared in the Module using the Providers metadata 13
  • 14. Httpclient module ● The newly designed HttpClient Module allows us to query the Remote API source to get data into our Application ● It requires us to Subscribe to the returned response using RxJs observables. 14
  • 15. Http Example (with retry()) getConfig() { return this.http.get<Config>(this.configUrl) .pipe( retry(3), // retry a failed request up to 3 times catchError(this.handleError) // then handle the error ); } 15
  • 16. Router ❖ The Router module handles the navigation & Routing in Angular ❖ The Routing allows us to move from one part of the application to another part or one View to another View A typical Angular Route has two properties: ● path: a string that matches the URL in the browser address bar. ● component: the component that the router should create when navigating to this route. 16
  • 17. Middleware/ Guard in Angular ● CanActivate (Checks to see if a user can visit a route) ● CanActivateChild (Checks to see if a user can visit a routes children) ● CanDeactivate (Checks to see if a user can exit a route) 17
  • 18. Lazy load module in angular There are three main steps to setting up a lazy loaded feature module: ● Create the feature module. ● Create the feature module’s routing module. ● Configure the routes. Each feature module acts as a doorway via the router, the lazy loading syntax uses loadChildren followed by a string that is the path to the module, a hash mark or #, and the module’s class name. forRoot() and forChild() 18
  • 19. Structure of project ● feature module, ● shared module, ● core module 19
  • 20. ControlValueAccessor If you’re working on a complex project inevitably you will face the situation when you have to create a custom form control. The essential component of this task will be implementing ControlValueAccessor interface ControlValueAccessor{ writeValue(obj: any): void registerOnChange(fn: any): void registerOnTouched(fn: any): void setDisabledState(isDisabled: boolean)?: void } 20
  • 21. OAuth 2.0 Grants 1. Resource owner credentials grant Allow to request tokens on behalf of user by sending the username and password to the token end points. 1. Authorisation Code Grant The authorization code grant should be very familiar if you’ve ever signed into an application using your Facebook or Google account. 3 Client credentials grant this grant is suitable for machine-to-machine authentication where a specific user’s permission to access data is not required. 21
  • 22. 4. Implicit grant similar to the authorization code grant with two distinct differences. ● single page web apps that can’t keep a client secret because all of the application code and storage is easily accessible ● the authorization server returns an access token instead of authorization code 5. Refresh token grant Access tokens eventually expire; however some grants respond with a refresh token which enables the client to get a new access token without requiring the user to be redirected. 22