SlideShare a Scribd company logo
HTML enhanced for web apps!HTML enhanced for web apps!
Back in time ...
Websites instead of webapps
Client seen as an interface
All the workload handled by
the server
No client-side logic
Javascript coder seen as web
designer
… when dinosaurs rule the Earth
Getting into the present day...
AJAX – HTML5 – CSS3
Web 2.0
Client splitted from server
Lots of new Javascript libraries
Webapp
Javascript: the answer!
Javascript frameworks
MVC Architecture
Big webapp
No more comparison with
web designers!
A current problem
Too much time
Too much code
Too much stress
Building client-side
webapp is still hard
DOM Manipulation
Data validation
Angular for the life!
Data-binding
Basic templating directives
Form validation
Routing
Reusable components
Dependency injection
Unit-testing
Bootstrap
Load HTML DOM
Load the module associated with
the directive
Create the application injector
Compile the DOM treating the ng-
app directive as the root of the
compilation
Conceptual Overview
1. The browser loads the HTML and parses it
into a DOM
2. The browser loads angular.js script
3. Angular waits for DOMContentLoaded event
4. Angular looks for ng-app directive, which
designates the application boundary
5. The Module specified in ng-app (if any) is
used to configure the $injector
6. The $injector is used to create the $compile
service as well as $rootScope
7. The $compile service is used to compile the
DOM and link it with $rootScope
HTML Compiler
Compile: traverse the DOM and collect all of the directives.
The result is a linking function.
Link: combine the directives with a scope and produce a
live view. Any changes in the scope model are reflected in
the view, and any user interactions with the view are
reflected in the scope model. This makes the scope model
the single source of truth.
Compiler is an angular service which traverses the DOM looking for attributes
Data-binding
Also known as MVVM
Runtime
1. The browser's event-loop waits
for an event to arrive. An event is
a user interaction, timer event, or
network event (response from a
server)
2. The event's callback gets
executed. This enters the
JavaScript context. The callback
can modify the DOM structure
3. Once the callback executes,
the browser leaves the JavaScript
context and re-renders the view
based on DOM changes.
Runtime in detail
1. Enter Angular execution context by calling scope.
$apply(stimulusFn)
2. Angular executes the stimulusFn(), which typically modifies
application state
3. Angular enters the $digest loop. The loop is made up of two smaller
loops which process $evalAsync queue and the $watch list. The
$digest loop keeps iterating until the model stabilizes.
4. The $evalAsync queue is used to schedule work which needs to
occur outside of current stack frame, but before the browser's view
render
5. The $watch list is a set of expressions which may have changed
since last iteration. If a change is detected then the $watch function is
called which typically updates the DOM with the new value
7. Once the Angular $digest loop finishes the execution leaves the
Angular and JavaScript context. This is followed by the browser re-
rendering the DOM to reflect any changes
Scope & View
The browser parses the HTML into
the DOM, and the DOM becomes
the input to the template engine
known as the compiler. The
compiler looks for directives which
in turn set up watches on the model.
The result is a continuously
updating view which does not need
template model re-merging. Your
model becomes the single source-
of-truth for your view.
The scope is responsible for detecting changes to the model section
and provides the execution context for expressions.
Directives & Filters
A directive is a behavior or DOM transformation which is triggered by
the presence of a custom attribute, element name, or a class name. A
directive allows you to extend the HTML vocabulary in a declarative
fashion.
<input type=”text” ng-model=”user.name” placeholder=”Foo”/>
Filters perform data transformation. Typically they are used in
conjunction with the locale to format the data in locale specific output.
They follow the spirit of UNIX filters and use similar syntax | (pipe).
<div>Negative number: {{val | number:2}}</div>
<div>Your name (in lowercase): {{user.name | lowercase}}</div>
Modules & Injectors
The injector is a service locator. There
is a single injector per Angular
application. The injector provides a
way to look up an object instance by its
name. The injector keeps an internal
cache of all objects so that repeated
calls to get the same object name
result in the same instance. If the
object does not exist, then the injector
asks the instance factory to create a
new instance.
A module is a way to configure the injector's instance factory, known
as a provider.
What's next?
Forms
i18n & l10n
Modules
Dependencies
MVC
E2E Testing
Angular Services
etc etc etc
The End

More Related Content

PDF
Overview of the AngularJS framework
Yakov Fain
 
PPTX
AngularJs presentation
Phan Tuan
 
PDF
Introduction to AngularJS
Jussi Pohjolainen
 
PDF
AngularJS application architecture
Gabriele Falace
 
PPTX
Introduction to Angularjs
Manish Shekhawat
 
ODP
AngularJs Crash Course
Keith Bloomfield
 
PDF
AngularJS Basics and Best Practices - CC FE &UX
JWORKS powered by Ordina
 
PPTX
Angular js 2
Ran Wahle
 
Overview of the AngularJS framework
Yakov Fain
 
AngularJs presentation
Phan Tuan
 
Introduction to AngularJS
Jussi Pohjolainen
 
AngularJS application architecture
Gabriele Falace
 
Introduction to Angularjs
Manish Shekhawat
 
AngularJs Crash Course
Keith Bloomfield
 
AngularJS Basics and Best Practices - CC FE &UX
JWORKS powered by Ordina
 
Angular js 2
Ran Wahle
 

What's hot (20)

PPTX
Angularjs Basics
Anuradha Bandara
 
PPTX
Angular js
Behind D Walls
 
PPTX
The AngularJS way
Boyan Mihaylov
 
PDF
Building scalable applications with angular js
Andrew Alpert
 
PDF
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
PPTX
AngularJS Best Practices
Narek Mamikonyan
 
PDF
AngularJS best-practices
Henry Tao
 
PDF
AngularJS introduction
Tania Gonzales
 
PPTX
Single Page Applications with AngularJS 2.0
Sumanth Chinthagunta
 
PPTX
Angular JS - Introduction
Sagar Acharya
 
PPTX
Practical AngularJS
Wei Ru
 
PPTX
Angular js architecture (v1.4.8)
Gabi Costel Lapusneanu
 
PDF
Angular2 Development for Java developers
Yakov Fain
 
PDF
Workshop 14: AngularJS Parte III
Visual Engineering
 
PDF
AngularJS Best Practices
Betclic Everest Group Tech Team
 
PDF
Workshop 13: AngularJS Parte II
Visual Engineering
 
PDF
Dependency Injection @ AngularJS
Ran Mizrahi
 
ODP
Introduction to Angular 2
Knoldus Inc.
 
PDF
AngularJS Project Setup step-by- step guide - RapidValue Solutions
RapidValue
 
PPTX
Front end development with Angular JS
Bipin
 
Angularjs Basics
Anuradha Bandara
 
Angular js
Behind D Walls
 
The AngularJS way
Boyan Mihaylov
 
Building scalable applications with angular js
Andrew Alpert
 
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
AngularJS Best Practices
Narek Mamikonyan
 
AngularJS best-practices
Henry Tao
 
AngularJS introduction
Tania Gonzales
 
Single Page Applications with AngularJS 2.0
Sumanth Chinthagunta
 
Angular JS - Introduction
Sagar Acharya
 
Practical AngularJS
Wei Ru
 
Angular js architecture (v1.4.8)
Gabi Costel Lapusneanu
 
Angular2 Development for Java developers
Yakov Fain
 
Workshop 14: AngularJS Parte III
Visual Engineering
 
AngularJS Best Practices
Betclic Everest Group Tech Team
 
Workshop 13: AngularJS Parte II
Visual Engineering
 
Dependency Injection @ AngularJS
Ran Mizrahi
 
Introduction to Angular 2
Knoldus Inc.
 
AngularJS Project Setup step-by- step guide - RapidValue Solutions
RapidValue
 
Front end development with Angular JS
Bipin
 
Ad

Similar to Angularjs (20)

PDF
Client Side MVC & Angular
Alexe Bogdan
 
PDF
AngularJS: Overview & Key Features
Mohamad Al Asmar
 
PDF
Beginning MEAN Stack
Rob Davarnia
 
PDF
Angular JS - Javascript framework for superheroes
Eugenio Minardi
 
PDF
AngularJS - Javascript framework for superheroes
Vincenzo Ferrari
 
PPTX
Intoduction to Angularjs
Gaurav Agrawal
 
PDF
Introduction to Angularjs : kishan kumar
Appfinz Technologies
 
PDF
Jinal desai .net
rohitkumar1987in
 
PDF
Android chapter16-web-services
Aravindharamanan S
 
PDF
Mvc interview questions – deep dive jinal desai
jinaldesailive
 
PPTX
Understanding angular js
Aayush Shrestha
 
DOCX
Angular.js interview questions
codeandyou forums
 
PDF
Unit 07: Design Patterns and Frameworks (1/3)
DSBW 2011/2002 - Carles Farré - Barcelona Tech
 
PPT
MVC
akshin
 
PPTX
.NET,ASP .NET, Angular Js,LinQ
Avijit Shaw
 
PDF
MVC
Ravi Bansal
 
DOCX
Single Page Application
Prasad Narasimhan
 
PPT
DDD Framework for Java: JdonFramework
banq jdon
 
PDF
Modern webtechnologies
Besjan Xhika
 
PDF
Advanced web application architecture Way2Web
Matthias Noback
 
Client Side MVC & Angular
Alexe Bogdan
 
AngularJS: Overview & Key Features
Mohamad Al Asmar
 
Beginning MEAN Stack
Rob Davarnia
 
Angular JS - Javascript framework for superheroes
Eugenio Minardi
 
AngularJS - Javascript framework for superheroes
Vincenzo Ferrari
 
Intoduction to Angularjs
Gaurav Agrawal
 
Introduction to Angularjs : kishan kumar
Appfinz Technologies
 
Jinal desai .net
rohitkumar1987in
 
Android chapter16-web-services
Aravindharamanan S
 
Mvc interview questions – deep dive jinal desai
jinaldesailive
 
Understanding angular js
Aayush Shrestha
 
Angular.js interview questions
codeandyou forums
 
Unit 07: Design Patterns and Frameworks (1/3)
DSBW 2011/2002 - Carles Farré - Barcelona Tech
 
MVC
akshin
 
.NET,ASP .NET, Angular Js,LinQ
Avijit Shaw
 
Single Page Application
Prasad Narasimhan
 
DDD Framework for Java: JdonFramework
banq jdon
 
Modern webtechnologies
Besjan Xhika
 
Advanced web application architecture Way2Web
Matthias Noback
 
Ad

Recently uploaded (20)

PPTX
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
PDF
Revolutionize Operations with Intelligent IoT Monitoring and Control
Rejig Digital
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PDF
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
Captain IT
 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
DOCX
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
PDF
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
CIFDAQ
 
PPTX
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
PDF
Software Development Company | KodekX
KodekX
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PPTX
C Programming Basics concept krnppt.pptx
Karan Prajapat
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
DevOps & Developer Experience Summer BBQ
AUGNYC
 
PDF
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
Enable Enterprise-Ready Security on IBM i Systems.pdf
Precisely
 
PDF
Make GenAI investments go further with the Dell AI Factory - Infographic
Principled Technologies
 
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
Revolutionize Operations with Intelligent IoT Monitoring and Control
Rejig Digital
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
How Onsite IT Support Drives Business Efficiency, Security, and Growth.pdf
Captain IT
 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
 
Top AI API Alternatives to OpenAI: A Side-by-Side Breakdown
vilush
 
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
CIFDAQ
 
Smart Infrastructure and Automation through IoT Sensors
Rejig Digital
 
Software Development Company | KodekX
KodekX
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
C Programming Basics concept krnppt.pptx
Karan Prajapat
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
DevOps & Developer Experience Summer BBQ
AUGNYC
 
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Enable Enterprise-Ready Security on IBM i Systems.pdf
Precisely
 
Make GenAI investments go further with the Dell AI Factory - Infographic
Principled Technologies
 

Angularjs

  • 1. HTML enhanced for web apps!HTML enhanced for web apps!
  • 2. Back in time ... Websites instead of webapps Client seen as an interface All the workload handled by the server No client-side logic Javascript coder seen as web designer … when dinosaurs rule the Earth
  • 3. Getting into the present day... AJAX – HTML5 – CSS3 Web 2.0 Client splitted from server Lots of new Javascript libraries Webapp
  • 4. Javascript: the answer! Javascript frameworks MVC Architecture Big webapp No more comparison with web designers!
  • 5. A current problem Too much time Too much code Too much stress Building client-side webapp is still hard DOM Manipulation Data validation
  • 6. Angular for the life! Data-binding Basic templating directives Form validation Routing Reusable components Dependency injection Unit-testing
  • 7. Bootstrap Load HTML DOM Load the module associated with the directive Create the application injector Compile the DOM treating the ng- app directive as the root of the compilation
  • 8. Conceptual Overview 1. The browser loads the HTML and parses it into a DOM 2. The browser loads angular.js script 3. Angular waits for DOMContentLoaded event 4. Angular looks for ng-app directive, which designates the application boundary 5. The Module specified in ng-app (if any) is used to configure the $injector 6. The $injector is used to create the $compile service as well as $rootScope 7. The $compile service is used to compile the DOM and link it with $rootScope
  • 9. HTML Compiler Compile: traverse the DOM and collect all of the directives. The result is a linking function. Link: combine the directives with a scope and produce a live view. Any changes in the scope model are reflected in the view, and any user interactions with the view are reflected in the scope model. This makes the scope model the single source of truth. Compiler is an angular service which traverses the DOM looking for attributes
  • 11. Runtime 1. The browser's event-loop waits for an event to arrive. An event is a user interaction, timer event, or network event (response from a server) 2. The event's callback gets executed. This enters the JavaScript context. The callback can modify the DOM structure 3. Once the callback executes, the browser leaves the JavaScript context and re-renders the view based on DOM changes.
  • 12. Runtime in detail 1. Enter Angular execution context by calling scope. $apply(stimulusFn) 2. Angular executes the stimulusFn(), which typically modifies application state 3. Angular enters the $digest loop. The loop is made up of two smaller loops which process $evalAsync queue and the $watch list. The $digest loop keeps iterating until the model stabilizes. 4. The $evalAsync queue is used to schedule work which needs to occur outside of current stack frame, but before the browser's view render 5. The $watch list is a set of expressions which may have changed since last iteration. If a change is detected then the $watch function is called which typically updates the DOM with the new value 7. Once the Angular $digest loop finishes the execution leaves the Angular and JavaScript context. This is followed by the browser re- rendering the DOM to reflect any changes
  • 13. Scope & View The browser parses the HTML into the DOM, and the DOM becomes the input to the template engine known as the compiler. The compiler looks for directives which in turn set up watches on the model. The result is a continuously updating view which does not need template model re-merging. Your model becomes the single source- of-truth for your view. The scope is responsible for detecting changes to the model section and provides the execution context for expressions.
  • 14. Directives & Filters A directive is a behavior or DOM transformation which is triggered by the presence of a custom attribute, element name, or a class name. A directive allows you to extend the HTML vocabulary in a declarative fashion. <input type=”text” ng-model=”user.name” placeholder=”Foo”/> Filters perform data transformation. Typically they are used in conjunction with the locale to format the data in locale specific output. They follow the spirit of UNIX filters and use similar syntax | (pipe). <div>Negative number: {{val | number:2}}</div> <div>Your name (in lowercase): {{user.name | lowercase}}</div>
  • 15. Modules & Injectors The injector is a service locator. There is a single injector per Angular application. The injector provides a way to look up an object instance by its name. The injector keeps an internal cache of all objects so that repeated calls to get the same object name result in the same instance. If the object does not exist, then the injector asks the instance factory to create a new instance. A module is a way to configure the injector's instance factory, known as a provider.
  • 16. What's next? Forms i18n & l10n Modules Dependencies MVC E2E Testing Angular Services etc etc etc