SlideShare a Scribd company logo
1
AngularJS - CloudVis Technology
AngularJS Framework
Tăng Phú
phutang@cloudvis.vn
Technical Leader @ CloudVis Technology
2
AngularJS - CloudVis Technology
Agenda
Introduction to AngularJS
Anatomy of an AngularJS application
Communicating with Servers
Custom Directives (advanced)
3
AngularJS - CloudVis Technology
Introduction to AngularJS
Angular Team @ Google
4
AngularJS - CloudVis Technology
Introduction to AngularJS
Experiences from building large web applications
like Gmail, Maps, Canlendar …
Open Source Javascript Framework
Use
MVC architecture
Data binding
Client side templates
Dependency injection
5
AngularJS - CloudVis Technology
Introduction to AngularJS
hello-world.html
hello_controller.js
6
AngularJS - CloudVis Technology
Introduction to AngularJS
Result Hello, World
A few interesting things
Bind with no classes, no IDs in HTML
No register events
hello_controller.js is plain JavaScript class
Auto inject $scope
Auto init HelloController
7
AngularJS - CloudVis Technology
Introduction to AngularJS
Data Binding
8
AngularJS - CloudVis Technology
Introduction to AngularJS
Result
Type: Hi
9
AngularJS - CloudVis Technology
Anatomy of an AngularJS application
Structure – Basic workflow
10
AngularJS - CloudVis Technology
Anatomy of an AngularJS application
● Line 2: define a part of DOM which is managed by Angular
● Line 5, 6: import library and your code
● Line 9: define scope (what's scope?) and bind with
HelloController, ng-controller attribute
● Line 10: define data with ng-model attribute
● Line 11: display text with {{ }}
● Line 12: behavior with ng-click attribute
11
AngularJS - CloudVis Technology
Basic startup flow
User requests a first page
Load a index.html page with template
Wait for the page fullly loaded, and looks ng-app
Scan binding and directives (what's directive?)
Connect to server to load additional data (call ajax to get
data)
12
AngularJS - CloudVis Technology
Basic startup flow
Images from http://docs.angularjs.org/guide/concepts
13
AngularJS - CloudVis Technology
What's Directive?
Kinds of Directive
E - Element name: <my-directive></my-directive>
A - Attribute: <div my-directive="exp"> </div>
C - Class: <div class="my-directive: exp;"></div>
M - Comment: <!-- directive: my-directive exp -->
Built-in Directive
ng-app (A)
ng-controller (A, C)
ng-model (A, C)
ng-change (E, A)
ng-click (A, C)
ng-repeat (A, C)
….
Ref: http://docs.angularjs.org/api/
14
AngularJS - CloudVis Technology
Directive Example
<p ng-bind="greeting"></p>
<form ng-controller="SomeController">
<input type="checkbox" ng-model="youCheckedIt">
</form>
<form ng-submit="requestFunding()"
ng-controller="StartUpController">
Starting: <input ng-change="computeNeeded()"
ng-model="startingEstimate">
Recommendation: {{needed}}
<button>Fund my startup!</button>
<button ng-click="reset()">Reset</button>
</form>
15
AngularJS - CloudVis Technology
What's Scope?
Scope as Data-Model
The glue between application controller and the view
Both controllers and directives have reference to the scope,
but not to each other.
16
AngularJS - CloudVis Technology
What's Controller?
A controller is a JavaScript function that is used to augment
instances of angular Scope
Use controllers to
Set up the initial state of a scope object.
Add behavior to the scope object.
17
AngularJS - CloudVis Technology
What's View?
To generate the View (render a DOM), AngularJS gathers
information from Template, applies Controller functions, link
Model properties
18
AngularJS - CloudVis Technology
Integration
19
AngularJS - CloudVis Technology
Data Binding
In the Angular implementation of MVC, the view has
knowledge of both the model and the controller.
The view knows about the model where two-way data-binding
occurs
Images from http://docs.angularjs.org/guide/dev_guide.templates.databinding
Classical Template Systems Angular Templates
20
AngularJS - CloudVis Technology
Communicating with Servers
21
AngularJS - CloudVis Technology
Communicating with Servers
AngularJS support
$http
General usage
Shortcut methods
$http.get() $http.head() $http.post() $http.put()
$http.delete() $http.jsonp()
22
AngularJS - CloudVis Technology
Communicating with Servers
$resource (Dependencies on $http)
23
AngularJS - CloudVis Technology
Communicating with Servers
var data = Data.get({id:123}, function() {
data.isDefault = true;
data.$save();
});
{ 'get': {method:'GET'},
'save': {method:'POST'},
'query': {method:'GET', isArray:true},
'remove': {method:'DELETE'},
'delete': {method:'DELETE'} };
$resource (Dependencies on $http)
24
AngularJS - CloudVis Technology
Custom Directives (advanced)
E - Element name: <my-directive></my-directive>
A - Attribute: <div my-directive="exp"> </div>
C - Class: <div class="my-directive: exp;"></div>
M - Comment: <!-- directive: my-directive exp -->
25
AngularJS - CloudVis Technology
Writing directives
26
AngularJS - CloudVis Technology
Wrapper DataTables
DataTables
(plug-in for jQuery)
27
AngularJS - CloudVis Technology
Wrapper DataTables
DataTables (plug-in for jQuery)
Import DataTables jQuery
<script
type="text/javascript"
src="jquery.dataTables.js">
</script>
In Template
<cv-table
ajax-url="/data/users"
page-size="50">
</cv-table>
28
AngularJS - CloudVis Technology
References
http://angularjs.org/
Ebook: AngularJS, Oreilly, Apr 2013
29
AngularJS - CloudVis Technology
Thank you

More Related Content

What's hot (20)

PPTX
AngularJS in 60ish Minutes
Dan Wahlin
 
PPTX
AngularJS Internal
Eyal Vardi
 
PPTX
Angularjs Basics
Anuradha Bandara
 
PPTX
Angular js
Behind D Walls
 
PPTX
The AngularJS way
Boyan Mihaylov
 
PPTX
Angular js architecture (v1.4.8)
Gabi Costel Lapusneanu
 
PDF
Introduction to AngularJS
Jussi Pohjolainen
 
PDF
AngularJS Project Setup step-by- step guide - RapidValue Solutions
RapidValue
 
PDF
AngularJS best-practices
Henry Tao
 
PDF
AngularJS: an introduction
Luigi De Russis
 
PPTX
AngularJS with TypeScript and Windows Azure Mobile Services
Rainer Stropek
 
PPTX
AngularJS Directives
Eyal Vardi
 
PPTX
AngularJs $provide API internals & circular dependency problem.
Yan Yankowski
 
PDF
GDayX - Advanced Angular.JS
Nicolas Embleton
 
PPTX
Angular js
Manav Prasad
 
PPTX
AngularJS Animations
Eyal Vardi
 
PDF
Building scalable applications with angular js
Andrew Alpert
 
PPTX
Building an End-to-End AngularJS Application
Dan Wahlin
 
PDF
AngularJS introduction
Tania Gonzales
 
PDF
Workshop 12: AngularJS Parte I
Visual Engineering
 
AngularJS in 60ish Minutes
Dan Wahlin
 
AngularJS Internal
Eyal Vardi
 
Angularjs Basics
Anuradha Bandara
 
Angular js
Behind D Walls
 
The AngularJS way
Boyan Mihaylov
 
Angular js architecture (v1.4.8)
Gabi Costel Lapusneanu
 
Introduction to AngularJS
Jussi Pohjolainen
 
AngularJS Project Setup step-by- step guide - RapidValue Solutions
RapidValue
 
AngularJS best-practices
Henry Tao
 
AngularJS: an introduction
Luigi De Russis
 
AngularJS with TypeScript and Windows Azure Mobile Services
Rainer Stropek
 
AngularJS Directives
Eyal Vardi
 
AngularJs $provide API internals & circular dependency problem.
Yan Yankowski
 
GDayX - Advanced Angular.JS
Nicolas Embleton
 
Angular js
Manav Prasad
 
AngularJS Animations
Eyal Vardi
 
Building scalable applications with angular js
Andrew Alpert
 
Building an End-to-End AngularJS Application
Dan Wahlin
 
AngularJS introduction
Tania Gonzales
 
Workshop 12: AngularJS Parte I
Visual Engineering
 

Viewers also liked (14)

PDF
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
PPTX
Introduction to Angularjs
Manish Shekhawat
 
ODP
History of JavaScript
Rajat Saxena
 
PPT
Java Script - Module I
Mustafa Qamar-ud-Din
 
PDF
Discover AngularJS
Fabien Vauchelles
 
PPT
Let your website a ride of AngularJS
Mike Taylor
 
PDF
Spring Bootで変わる Javaアプリ開発! #jsug
Toshiaki Maki
 
PDF
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)
Chris Richardson
 
PPTX
Benefits of developing single page web applications using angular js
Harbinger Systems - HRTech Builder of Choice
 
PDF
AngularJS application architecture
Gabriele Falace
 
PDF
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
PDF
Spring Boot - Uma app do 0 a Web em 30 minutos
phelypploch
 
PDF
Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017)
🎤 Hanno Embregts 🎸
 
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
Introduction to Angularjs
Manish Shekhawat
 
History of JavaScript
Rajat Saxena
 
Java Script - Module I
Mustafa Qamar-ud-Din
 
Discover AngularJS
Fabien Vauchelles
 
Let your website a ride of AngularJS
Mike Taylor
 
Spring Bootで変わる Javaアプリ開発! #jsug
Toshiaki Maki
 
Deploying Spring Boot applications with Docker (east bay cloud meetup dec 2014)
Chris Richardson
 
Benefits of developing single page web applications using angular js
Harbinger Systems - HRTech Builder of Choice
 
AngularJS application architecture
Gabriele Falace
 
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
Spring Boot - Uma app do 0 a Web em 30 minutos
phelypploch
 
Building a Spring Boot Application - Ask the Audience! (from JavaLand 2017)
🎤 Hanno Embregts 🎸
 
Ad

Similar to AngularJS Framework (20)

PPTX
Angular js 1.3 presentation for fed nov 2014
Sarah Hudson
 
PPT
Getting started with angular js
Maurice De Beijer [MVP]
 
DOCX
angularjs_tutorial.docx
telegramvip
 
PPTX
AngularJS = Browser applications on steroids
Maurice De Beijer [MVP]
 
PPTX
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
PDF
Introduction to Angularjs : kishan kumar
Appfinz Technologies
 
PDF
CraftCamp for Students - Introduction to AngularJS
craftworkz
 
PDF
AngularJS Workshop
Gianluca Cacace
 
PPT
Getting started with angular js
Maurice De Beijer [MVP]
 
PPTX
AngularJs presentation
Phan Tuan
 
PPTX
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
PPSX
Angular js
Arun Somu Panneerselvam
 
PDF
AngularJS By Vipin
Vipin Mundayad
 
PPTX
Basics of AngularJS
Filip Janevski
 
PPTX
Angular workshop - Full Development Guide
Nitin Giri
 
PPTX
Angular presentation
merlihan
 
PDF
Wt unit 5 client &amp; server side framework
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
PDF
Everything You Need To Know About AngularJS
Sina Mirhejazi
 
PDF
AngularJS - TechTalk 3/2/2014
Spyros Ioakeimidis
 
Angular js 1.3 presentation for fed nov 2014
Sarah Hudson
 
Getting started with angular js
Maurice De Beijer [MVP]
 
angularjs_tutorial.docx
telegramvip
 
AngularJS = Browser applications on steroids
Maurice De Beijer [MVP]
 
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
Introduction to Angularjs : kishan kumar
Appfinz Technologies
 
CraftCamp for Students - Introduction to AngularJS
craftworkz
 
AngularJS Workshop
Gianluca Cacace
 
Getting started with angular js
Maurice De Beijer [MVP]
 
AngularJs presentation
Phan Tuan
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
AngularJS By Vipin
Vipin Mundayad
 
Basics of AngularJS
Filip Janevski
 
Angular workshop - Full Development Guide
Nitin Giri
 
Angular presentation
merlihan
 
Wt unit 5 client &amp; server side framework
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
Everything You Need To Know About AngularJS
Sina Mirhejazi
 
AngularJS - TechTalk 3/2/2014
Spyros Ioakeimidis
 
Ad

Recently uploaded (20)

PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
Digital Circuits, important subject in CS
contactparinay1
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 

AngularJS Framework

  • 1. 1 AngularJS - CloudVis Technology AngularJS Framework Tăng Phú [email protected] Technical Leader @ CloudVis Technology
  • 2. 2 AngularJS - CloudVis Technology Agenda Introduction to AngularJS Anatomy of an AngularJS application Communicating with Servers Custom Directives (advanced)
  • 3. 3 AngularJS - CloudVis Technology Introduction to AngularJS Angular Team @ Google
  • 4. 4 AngularJS - CloudVis Technology Introduction to AngularJS Experiences from building large web applications like Gmail, Maps, Canlendar … Open Source Javascript Framework Use MVC architecture Data binding Client side templates Dependency injection
  • 5. 5 AngularJS - CloudVis Technology Introduction to AngularJS hello-world.html hello_controller.js
  • 6. 6 AngularJS - CloudVis Technology Introduction to AngularJS Result Hello, World A few interesting things Bind with no classes, no IDs in HTML No register events hello_controller.js is plain JavaScript class Auto inject $scope Auto init HelloController
  • 7. 7 AngularJS - CloudVis Technology Introduction to AngularJS Data Binding
  • 8. 8 AngularJS - CloudVis Technology Introduction to AngularJS Result Type: Hi
  • 9. 9 AngularJS - CloudVis Technology Anatomy of an AngularJS application Structure – Basic workflow
  • 10. 10 AngularJS - CloudVis Technology Anatomy of an AngularJS application ● Line 2: define a part of DOM which is managed by Angular ● Line 5, 6: import library and your code ● Line 9: define scope (what's scope?) and bind with HelloController, ng-controller attribute ● Line 10: define data with ng-model attribute ● Line 11: display text with {{ }} ● Line 12: behavior with ng-click attribute
  • 11. 11 AngularJS - CloudVis Technology Basic startup flow User requests a first page Load a index.html page with template Wait for the page fullly loaded, and looks ng-app Scan binding and directives (what's directive?) Connect to server to load additional data (call ajax to get data)
  • 12. 12 AngularJS - CloudVis Technology Basic startup flow Images from http://docs.angularjs.org/guide/concepts
  • 13. 13 AngularJS - CloudVis Technology What's Directive? Kinds of Directive E - Element name: <my-directive></my-directive> A - Attribute: <div my-directive="exp"> </div> C - Class: <div class="my-directive: exp;"></div> M - Comment: <!-- directive: my-directive exp --> Built-in Directive ng-app (A) ng-controller (A, C) ng-model (A, C) ng-change (E, A) ng-click (A, C) ng-repeat (A, C) …. Ref: http://docs.angularjs.org/api/
  • 14. 14 AngularJS - CloudVis Technology Directive Example <p ng-bind="greeting"></p> <form ng-controller="SomeController"> <input type="checkbox" ng-model="youCheckedIt"> </form> <form ng-submit="requestFunding()" ng-controller="StartUpController"> Starting: <input ng-change="computeNeeded()" ng-model="startingEstimate"> Recommendation: {{needed}} <button>Fund my startup!</button> <button ng-click="reset()">Reset</button> </form>
  • 15. 15 AngularJS - CloudVis Technology What's Scope? Scope as Data-Model The glue between application controller and the view Both controllers and directives have reference to the scope, but not to each other.
  • 16. 16 AngularJS - CloudVis Technology What's Controller? A controller is a JavaScript function that is used to augment instances of angular Scope Use controllers to Set up the initial state of a scope object. Add behavior to the scope object.
  • 17. 17 AngularJS - CloudVis Technology What's View? To generate the View (render a DOM), AngularJS gathers information from Template, applies Controller functions, link Model properties
  • 18. 18 AngularJS - CloudVis Technology Integration
  • 19. 19 AngularJS - CloudVis Technology Data Binding In the Angular implementation of MVC, the view has knowledge of both the model and the controller. The view knows about the model where two-way data-binding occurs Images from http://docs.angularjs.org/guide/dev_guide.templates.databinding Classical Template Systems Angular Templates
  • 20. 20 AngularJS - CloudVis Technology Communicating with Servers
  • 21. 21 AngularJS - CloudVis Technology Communicating with Servers AngularJS support $http General usage Shortcut methods $http.get() $http.head() $http.post() $http.put() $http.delete() $http.jsonp()
  • 22. 22 AngularJS - CloudVis Technology Communicating with Servers $resource (Dependencies on $http)
  • 23. 23 AngularJS - CloudVis Technology Communicating with Servers var data = Data.get({id:123}, function() { data.isDefault = true; data.$save(); }); { 'get': {method:'GET'}, 'save': {method:'POST'}, 'query': {method:'GET', isArray:true}, 'remove': {method:'DELETE'}, 'delete': {method:'DELETE'} }; $resource (Dependencies on $http)
  • 24. 24 AngularJS - CloudVis Technology Custom Directives (advanced) E - Element name: <my-directive></my-directive> A - Attribute: <div my-directive="exp"> </div> C - Class: <div class="my-directive: exp;"></div> M - Comment: <!-- directive: my-directive exp -->
  • 25. 25 AngularJS - CloudVis Technology Writing directives
  • 26. 26 AngularJS - CloudVis Technology Wrapper DataTables DataTables (plug-in for jQuery)
  • 27. 27 AngularJS - CloudVis Technology Wrapper DataTables DataTables (plug-in for jQuery) Import DataTables jQuery <script type="text/javascript" src="jquery.dataTables.js"> </script> In Template <cv-table ajax-url="/data/users" page-size="50"> </cv-table>
  • 28. 28 AngularJS - CloudVis Technology References http://angularjs.org/ Ebook: AngularJS, Oreilly, Apr 2013
  • 29. 29 AngularJS - CloudVis Technology Thank you