SlideShare a Scribd company logo
Overview & Key Features
MOHAMMAD ASMAR
NETWAYS – SOFTWARE ENGINEER
Agenda
A. Introduction
B. AngularJS Core Features
C. Guides & Help
1. Client Side MVC
2. Modules
3. Dependency Injection
4. Scopes
5. Controllers
6. Expressions
7. Two-Way Data Binding
8. Directives
9. Services
10. Filters
11. Validators
12. Routing
A. Introduction
1. What is angular?
2. Why angular?
1.1. What is angular ?
 AngularJS is a JavaScript framework to build single page
applications (SPA) and web apps that run on a web browser
using html.
 Created by Misko Hevery and published in 2009
 Open Source, supported by Google.
 Released under MIT License
 Website: https://angularJS.org
Download
Source Code Documentation
1.2. Why angular?
 Facilitate building single-page applications
Page never reloads
No server-side page rendering
 Based on the Model View Controller Concept
 Provide solutions for:
 Routing – handling updates to the URL hash fragment
 Templating – dynamically creating and updating HTML based on templates and models
 Data binding – synchronize the model and user interface
 Separation of concepts and standalone modules testing
 Efficiency of new features
 Well documented and easy to learn
B. Angular Core Features
Key Features of ANGULARJS
1. Client-Side MVC
View
ControllerModel
1. Event or User Action
or View Load
2. Maps to particular Model
after fetching the data
3. Implement the
Business Logic on
response data and
Bind it to View
Controller :
• Business Logic
• Application Scope & Functionality
Model:
• Notify view changes
• Data in general
View :
• Renders the Model data
• Send User actions/events to controller
• UI
2. Modules
 You can think of a module as a container for the different
parts of your app – controllers, services, filters, directives,
etc.
 Split one JS file into several files, use several apps
separately on one page.
 Angular itself is split into modules. (see
http://ngmodules.org). The file angular.js is a module
with core functionality.
2.1 Usage
 The angular.module is a global place for creating, registering and
retrieving Angular modules.
 Attached to the DOM with ng-app directive.
3. Dependency Injection
Injected Dependencies
Inline Array
Annotation
 Dependency Injection (DI) is a software design pattern.
 Instantiates and caches used components
4. Scopes
 Scope is an object that refers to the application model.
 It is an execution context for expressions.
 Scopes can watch expressions and propagate events.
 Shares variables between view and controller
5.1. Scope inheritance
5. Controllers
 Controllers create new child scopes
 Initialize the scope with data that view needs to display
 May contain:
 Scope variables
 Scope functions
 Should contain only business logic
 Set up the initial state of $scope object
 Add behavior to the $scope object
Attached to the DOM via the ng-controller directive
5.1. Usage
Defining Controller:
Using Controller in app:
 Normal method  Advanced method (with Routing)
6. Expressions
❖ Double curly braces syntax or interpolation bindings:
➢ Contains basically JavaScript
➢ Accesses scope variables and scope functions
 Expressions may also output functions and pass
parameters:
<h1>1 plus 2 equals <em>{{add(1,2)}}</em></h1>
6.1 usage
Examples:
 {{a+b}}
 {{alert('Does this work?')}}
 {{'Just outputs this string'}}
 {{user.name}}
7. Two-Way Data Binding
7.1. Example
Binding way: model > view
Binding way: view > model
8. Directives
❖ Everything in your DOM may be a directive:
➢ Elements (<ng-include></ng-include)
➢ Classes (class="ng-include: data;")
➢ Attribute (<b ng-include="data">)
➢ Comments (<!-- directive: ng-include data -->)
❖ Directives attach custom behavior to those elements
or transform them
8.1. AngularJS provided directives
❖ AngularJS provides plenty of its own directives:
ngClass
ngClick
ngInclude
ngModel
ngShow
ngApp
ngBind
ngChange
ngChecked
ngRepeat
8.2. Different syntax available
Directive ngModel:
<input ng-model="foo">
<input data-ng:model="foo">
<input data-ng-model="foo">
<input ng:model="foo">
<input ng_model="foo">
<input x-ng-model="foo">
Might be necessary for html/xhtml validation reasons
As per angular guides > Prefer
using the dash-delimited format
If you want to use an HTML
validating tool, you can instead
use the data-prefixed version
8.3. Usage
 Using angular directives
8.3. Usage
 Creating a custom directive with .directive() function
8.3. Usage
 Using custom directive in the view
9. Services
 Substitutable objects that are wired together using dependency
injection (DI).
 Reusable component & shared data
 Angular offers several useful services
 They are prepended with $
 Do not use $ in your own services
9.1. Useful services provided by Angular
 $http - For ajax requests
 $interval and $timeout - Repeats and delays
 $rootScope - Very top scope of application
 $location - URL and its parts of current site
 $window - Wrapper of global window. Useful for tests.
9.2. Usage (with Dependency Injection)
10. Filters
 Filters are used for formatting data displayed to the user
 Functions which modify expressions
 But does not touch the original data
 Using filters:
{{name | filter1 | filter2: option}}
10.1. AngularJS provided filters
 AngularJS provides few of its own filters:
currency
date
filter
json
limitTo
lowercase
number
orderBy
uppercase
10.2. Usage
 {{price | currency:'€'}} // €1,234.56
 {{name | uppercase}} // ARMIN
 {{created | date:'dd.MM.yyyy'}} // 20.06.2014
 Options of filters may be filled by scope variable:
{{created | date:format}}
10.3. Writing your own fiters
11. Validators
 Forms and/or fields get validated
 By HTML5 validation notation (eg. type="email")
 Independent from browser validation, Angular:
 Checks values on its own
 Adds indicating classes to fields and forms (eg. ng-invalid)
 Adds $invalid property to scope of form
 You may write your own validators using directives
11.1. Examples
12. Routing
 Enables deep-linking for single-page applications.
 Depends on angular’s ngRoute module.
 Configure rules into $routeProvider
12.1. usage
C. Guides & Help
 Guide: https://docs.angularjs.org/guide
 API: https://docs.angularjs.org/api
 Many articles, videos and examples on:
 YouTube: https://www.youtube.com/user/angularjs
 PluralSight: http://app.pluralsight.com/courses/angularjs-get-started
 Stackoverflow: http://stackoverflow.com/questions/tagged/angularjs?sort=votes
 CodeSchool: https://www.codeschool.com/courses/shaping-up-with-angular-js
Thanks for your ttention!

More Related Content

What's hot (20)

AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
Angularjs interview questions and answers
Angularjs interview questions and answersAngularjs interview questions and answers
Angularjs interview questions and answers
Anil Singh
 
AngularJS
AngularJSAngularJS
AngularJS
Maurice De Beijer [MVP]
 
Angular.js interview questions
Angular.js interview questionsAngular.js interview questions
Angular.js interview questions
codeandyou forums
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introduction
Tania Gonzales
 
Angularjs PPT
Angularjs PPTAngularjs PPT
Angularjs PPT
Amit Baghel
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
Manish Shekhawat
 
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
Armin Vieweg
 
Angular 2 interview questions and answers
Angular 2 interview questions and answersAngular 2 interview questions and answers
Angular 2 interview questions and answers
Anil Singh
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
Shyam Seshadri
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slides
samhelman
 
Front end development with Angular JS
Front end development with Angular JSFront end development with Angular JS
Front end development with Angular JS
Bipin
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
Angular js interview question answer for fresher
Angular js interview question answer for fresherAngular js interview question answer for fresher
Angular js interview question answer for fresher
Ravi Bhadauria
 
AngularJS interview questions
AngularJS interview questionsAngularJS interview questions
AngularJS interview questions
Uri Lukach
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
Sagar Acharya
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS intro
dizabl
 
Introduction to AngularJS Framework
Introduction to AngularJS FrameworkIntroduction to AngularJS Framework
Introduction to AngularJS Framework
Raveendra R
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
Luigi De Russis
 
Angular js presentation at Datacom
Angular js presentation at DatacomAngular js presentation at Datacom
Angular js presentation at Datacom
David Xi Peng Yang
 
AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
Angularjs interview questions and answers
Angularjs interview questions and answersAngularjs interview questions and answers
Angularjs interview questions and answers
Anil Singh
 
Angular.js interview questions
Angular.js interview questionsAngular.js interview questions
Angular.js interview questions
codeandyou forums
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introduction
Tania Gonzales
 
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
Armin Vieweg
 
Angular 2 interview questions and answers
Angular 2 interview questions and answersAngular 2 interview questions and answers
Angular 2 interview questions and answers
Anil Singh
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
Shyam Seshadri
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slides
samhelman
 
Front end development with Angular JS
Front end development with Angular JSFront end development with Angular JS
Front end development with Angular JS
Bipin
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
Angular js interview question answer for fresher
Angular js interview question answer for fresherAngular js interview question answer for fresher
Angular js interview question answer for fresher
Ravi Bhadauria
 
AngularJS interview questions
AngularJS interview questionsAngularJS interview questions
AngularJS interview questions
Uri Lukach
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
Sagar Acharya
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS intro
dizabl
 
Introduction to AngularJS Framework
Introduction to AngularJS FrameworkIntroduction to AngularJS Framework
Introduction to AngularJS Framework
Raveendra R
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
Luigi De Russis
 
Angular js presentation at Datacom
Angular js presentation at DatacomAngular js presentation at Datacom
Angular js presentation at Datacom
David Xi Peng Yang
 

Similar to AngularJS: Overview & Key Features (20)

Angular js
Angular jsAngular js
Angular js
Silver Touch Technologies Ltd
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
Nitin Giri
 
Angular js
Angular jsAngular js
Angular js
Ramakrishna kapa
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
Aayush Shrestha
 
Single Page Applications Workshop Part II: Single Page Applications using Ang...
Single Page Applications Workshop Part II: Single Page Applications using Ang...Single Page Applications Workshop Part II: Single Page Applications using Ang...
Single Page Applications Workshop Part II: Single Page Applications using Ang...
Jalal Mostafa
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
Ravi Mone
 
Angular js
Angular jsAngular js
Angular js
yogi_solanki
 
Angular js 1.0-fundamentals
Angular js 1.0-fundamentalsAngular js 1.0-fundamentals
Angular js 1.0-fundamentals
Venkatesh Narayanan
 
AngularJS
AngularJS AngularJS
AngularJS
NexThoughts Technologies
 
Training On Angular Js
Training On Angular JsTraining On Angular Js
Training On Angular Js
Mahima Radhakrishnan
 
Intro to AngularJs
Intro to AngularJsIntro to AngularJs
Intro to AngularJs
SolTech, Inc.
 
AngularJS Workshop
AngularJS WorkshopAngularJS Workshop
AngularJS Workshop
Gianluca Cacace
 
Dive into Angular, part 1: Introduction
Dive into Angular, part 1: IntroductionDive into Angular, part 1: Introduction
Dive into Angular, part 1: Introduction
Oleksii Prohonnyi
 
Angular js
Angular jsAngular js
Angular js
Hritesh Saha
 
Angular Presentation
Angular PresentationAngular Presentation
Angular Presentation
Adam Moore
 
Everything You Need To Know About AngularJS
Everything You Need To Know About AngularJSEverything You Need To Know About AngularJS
Everything You Need To Know About AngularJS
Sina Mirhejazi
 
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
Suresh Patidar
 
AngularJS By Vipin
AngularJS By VipinAngularJS By Vipin
AngularJS By Vipin
Vipin Mundayad
 
ME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS FundamentalsME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
Wei Ru
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
Nitin Giri
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
Aayush Shrestha
 
Single Page Applications Workshop Part II: Single Page Applications using Ang...
Single Page Applications Workshop Part II: Single Page Applications using Ang...Single Page Applications Workshop Part II: Single Page Applications using Ang...
Single Page Applications Workshop Part II: Single Page Applications using Ang...
Jalal Mostafa
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
Ravi Mone
 
Dive into Angular, part 1: Introduction
Dive into Angular, part 1: IntroductionDive into Angular, part 1: Introduction
Dive into Angular, part 1: Introduction
Oleksii Prohonnyi
 
Angular Presentation
Angular PresentationAngular Presentation
Angular Presentation
Adam Moore
 
Everything You Need To Know About AngularJS
Everything You Need To Know About AngularJSEverything You Need To Know About AngularJS
Everything You Need To Know About AngularJS
Sina Mirhejazi
 
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
Suresh Patidar
 
ME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS FundamentalsME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
Wei Ru
 
Ad

Recently uploaded (20)

ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdfENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdfHigh Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI FoundationsOracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdfWar_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdfCrypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptxFIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUEIntroduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptxFIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent IntegrationPyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization ProgramOracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too LateKubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy SurveyTrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdfENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
High Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdfHigh Availability On-Premises FME Flow.pdf
High Availability On-Premises FME Flow.pdf
Safe Software
 
Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...Analysis of the changes in the attitude of the news comments caused by knowin...
Analysis of the changes in the attitude of the news comments caused by knowin...
Matsushita Laboratory
 
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2Agentic AI: Beyond the Buzz- LangGraph Studio V2
Agentic AI: Beyond the Buzz- LangGraph Studio V2
Shashikant Jagtap
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI FoundationsOracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdfWar_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
Oracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI ProfessionalOracle Cloud Infrastructure Generative AI Professional
Oracle Cloud Infrastructure Generative AI Professional
VICTOR MAESTRE RAMIREZ
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
“Why It’s Critical to Have an Integrated Development Methodology for Edge AI,...
Edge AI and Vision Alliance
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdfCrypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptxFIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptxFIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent IntegrationPyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization ProgramOracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too LateKubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy SurveyTrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
Ad

AngularJS: Overview & Key Features

  • 1. Overview & Key Features MOHAMMAD ASMAR NETWAYS – SOFTWARE ENGINEER
  • 2. Agenda A. Introduction B. AngularJS Core Features C. Guides & Help 1. Client Side MVC 2. Modules 3. Dependency Injection 4. Scopes 5. Controllers 6. Expressions 7. Two-Way Data Binding 8. Directives 9. Services 10. Filters 11. Validators 12. Routing
  • 3. A. Introduction 1. What is angular? 2. Why angular?
  • 4. 1.1. What is angular ?  AngularJS is a JavaScript framework to build single page applications (SPA) and web apps that run on a web browser using html.  Created by Misko Hevery and published in 2009  Open Source, supported by Google.  Released under MIT License  Website: https://angularJS.org
  • 6. 1.2. Why angular?  Facilitate building single-page applications Page never reloads No server-side page rendering  Based on the Model View Controller Concept  Provide solutions for:  Routing – handling updates to the URL hash fragment  Templating – dynamically creating and updating HTML based on templates and models  Data binding – synchronize the model and user interface  Separation of concepts and standalone modules testing  Efficiency of new features  Well documented and easy to learn
  • 7. B. Angular Core Features Key Features of ANGULARJS
  • 8. 1. Client-Side MVC View ControllerModel 1. Event or User Action or View Load 2. Maps to particular Model after fetching the data 3. Implement the Business Logic on response data and Bind it to View Controller : • Business Logic • Application Scope & Functionality Model: • Notify view changes • Data in general View : • Renders the Model data • Send User actions/events to controller • UI
  • 9. 2. Modules  You can think of a module as a container for the different parts of your app – controllers, services, filters, directives, etc.  Split one JS file into several files, use several apps separately on one page.  Angular itself is split into modules. (see http://ngmodules.org). The file angular.js is a module with core functionality.
  • 10. 2.1 Usage  The angular.module is a global place for creating, registering and retrieving Angular modules.  Attached to the DOM with ng-app directive.
  • 11. 3. Dependency Injection Injected Dependencies Inline Array Annotation  Dependency Injection (DI) is a software design pattern.  Instantiates and caches used components
  • 12. 4. Scopes  Scope is an object that refers to the application model.  It is an execution context for expressions.  Scopes can watch expressions and propagate events.  Shares variables between view and controller
  • 14. 5. Controllers  Controllers create new child scopes  Initialize the scope with data that view needs to display  May contain:  Scope variables  Scope functions  Should contain only business logic  Set up the initial state of $scope object  Add behavior to the $scope object Attached to the DOM via the ng-controller directive
  • 15. 5.1. Usage Defining Controller: Using Controller in app:  Normal method  Advanced method (with Routing)
  • 16. 6. Expressions ❖ Double curly braces syntax or interpolation bindings: ➢ Contains basically JavaScript ➢ Accesses scope variables and scope functions  Expressions may also output functions and pass parameters: <h1>1 plus 2 equals <em>{{add(1,2)}}</em></h1>
  • 17. 6.1 usage Examples:  {{a+b}}  {{alert('Does this work?')}}  {{'Just outputs this string'}}  {{user.name}}
  • 18. 7. Two-Way Data Binding
  • 19. 7.1. Example Binding way: model > view Binding way: view > model
  • 20. 8. Directives ❖ Everything in your DOM may be a directive: ➢ Elements (<ng-include></ng-include) ➢ Classes (class="ng-include: data;") ➢ Attribute (<b ng-include="data">) ➢ Comments (<!-- directive: ng-include data -->) ❖ Directives attach custom behavior to those elements or transform them
  • 21. 8.1. AngularJS provided directives ❖ AngularJS provides plenty of its own directives: ngClass ngClick ngInclude ngModel ngShow ngApp ngBind ngChange ngChecked ngRepeat
  • 22. 8.2. Different syntax available Directive ngModel: <input ng-model="foo"> <input data-ng:model="foo"> <input data-ng-model="foo"> <input ng:model="foo"> <input ng_model="foo"> <input x-ng-model="foo"> Might be necessary for html/xhtml validation reasons As per angular guides > Prefer using the dash-delimited format If you want to use an HTML validating tool, you can instead use the data-prefixed version
  • 23. 8.3. Usage  Using angular directives
  • 24. 8.3. Usage  Creating a custom directive with .directive() function
  • 25. 8.3. Usage  Using custom directive in the view
  • 26. 9. Services  Substitutable objects that are wired together using dependency injection (DI).  Reusable component & shared data  Angular offers several useful services  They are prepended with $  Do not use $ in your own services
  • 27. 9.1. Useful services provided by Angular  $http - For ajax requests  $interval and $timeout - Repeats and delays  $rootScope - Very top scope of application  $location - URL and its parts of current site  $window - Wrapper of global window. Useful for tests.
  • 28. 9.2. Usage (with Dependency Injection)
  • 29. 10. Filters  Filters are used for formatting data displayed to the user  Functions which modify expressions  But does not touch the original data  Using filters: {{name | filter1 | filter2: option}}
  • 30. 10.1. AngularJS provided filters  AngularJS provides few of its own filters: currency date filter json limitTo lowercase number orderBy uppercase
  • 31. 10.2. Usage  {{price | currency:'€'}} // €1,234.56  {{name | uppercase}} // ARMIN  {{created | date:'dd.MM.yyyy'}} // 20.06.2014  Options of filters may be filled by scope variable: {{created | date:format}}
  • 32. 10.3. Writing your own fiters
  • 33. 11. Validators  Forms and/or fields get validated  By HTML5 validation notation (eg. type="email")  Independent from browser validation, Angular:  Checks values on its own  Adds indicating classes to fields and forms (eg. ng-invalid)  Adds $invalid property to scope of form  You may write your own validators using directives
  • 35. 12. Routing  Enables deep-linking for single-page applications.  Depends on angular’s ngRoute module.  Configure rules into $routeProvider
  • 37. C. Guides & Help  Guide: https://docs.angularjs.org/guide  API: https://docs.angularjs.org/api  Many articles, videos and examples on:  YouTube: https://www.youtube.com/user/angularjs  PluralSight: http://app.pluralsight.com/courses/angularjs-get-started  Stackoverflow: http://stackoverflow.com/questions/tagged/angularjs?sort=votes  CodeSchool: https://www.codeschool.com/courses/shaping-up-with-angular-js
  • 38. Thanks for your ttention!