Itroducing Angular JS

Carlos Emanuel Mathiasen
Carlos Emanuel MathiasenSoftware Developer en JPGM at JPGM
Angular JS
AngularJS is a toolset for building the
framework most suited to your application
development.
It is fully extensible and works well with other
libraries.
Every feature can be modified or replaced to
suit your unique development workflow and
feature needs.
Concepts
There are a few core ideas that you’ll use
throughout an Angular app. As it turns out,
we didn’t invent any of these. Instead, we’ve
borrowed heavily from successful idioms in
other development environments and
implemented them in a way that embraces
HTML, browsers, and many other familiar
web standards.
Concepts
●

Client-Side Templates

●

Model View Controller (MVC)

●

Data Binding

●

Dependency Injection

●

Directives
Client-Side Templates
●

●

Multi-page web applications create their
HTML by assembling and joining it with data
on the server, and then shipping the finished
pages up to the browser.
Angular is different in that the template and
data get shipped to the browser to be
assembled there.
Client-Side Templates
●

●

●

●

●

There are no classes or IDs in the HTML to identify
where to attach event listeners.
When HelloController set the greeting.text to Hello, we
didn’t have to register any event listeners or write any
callbacks.
HelloController is a plain JavaScript class, and doesn’t
inherit from anything.
HelloController got the $scope object that it needed
without having to create it.
We didn’t have to call the HelloController’s constructor
ourselves
Client-Side Templates

Example
●

●

●

Model View Controller (MVC)

MVC application structure was introduced in
the 1970s as part of Smalltalk.
The core idea behind MVC is that you have
clear separation in your code between
managing its data (model), the application
logic (controller), and presenting the data to
the user (view).
●

●

Model View Controller (MVC)

The view is the Document Object Model
(DOM)

●

The controllers are JavaScript classes

●

The model data is stored in object properties.
Data Binding

●

●

●

Before AJAX single-page apps were common,
platforms like Rails, PHP, or JSP helped us
create the user interface (UI) by merging
strings of HTML with data before sending it to
the users to display it.
Libraries like jQuery extended this model to
the client and let us follow a similar style, but
with the ability to update, part of the DOM
separately, rather than updating the whole
page.
Data Binding
●

This all works pretty well, but when you want
to insert fresher data into the UI, or change
the data based on user input, you need to do
quite a bit of non-trivial work to make sure you
get the data into the correct state, both in the
UI and in JavaScript properties.
Data Binding
●

●

●

But what if we could have all this work done
for us without writing code?
What if we could just declare which parts of
the UI map to which JavaScript properties and
have them sync automatically?
This style of programming is called

binding.

data
Data Binding

Example
Dependency Injection
●

●

●

The $scope object that does our data binding
is passed to us automatically
We didn’t have to create it by calling any
function.
We just asked for it by putting it in
HelloController’s constructor.
Dependency Injection
●

●

●

We get this magical effect through Angular’s
dependency injection system.
Dependency injection lets us follow a
development style in which, instead of
creating dependencies, our classes just ask
for what they need.
This follows a design pattern called the Law
of Demeter, also known as the principle of
least knowledge.
Directives
●

●

One of the best parts of Angular is that you
can write your templates as HTML.
You can do this because at the core of the
framework we’ve included a powerful DOM
transformation engine that lets you extend
HTML’s syntax.
Directives
●

●

●

●

Double-curly( {{ something }} ) notation for
data binding.
ng-app directive lets you tell Angular which
part of your page it should expect to manage
ng-controller for specifying which controller
oversees which part of the view.
ng-model, which binds an input to part of the
model.

●

And more...

●

And you can write your own
Examples

●

http://plnkr.co/edit/Vk6tt1WByib2AjA0ka7Z?p=preview

●

http://plnkr.co/edit/nOJqrklbC48i71ETHb6p?p=preview
1 of 17

Recommended

AngularJS = Browser applications on steroids by
AngularJS = Browser applications on steroidsAngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsMaurice De Beijer [MVP]
3.5K views19 slides
Angular introduction basic by
Angular introduction basicAngular introduction basic
Angular introduction basicjagriti srivastava
42 views8 slides
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin by
Will your code blend? : Toronto Code Camp 2010 : Barry GervinWill your code blend? : Toronto Code Camp 2010 : Barry Gervin
Will your code blend? : Toronto Code Camp 2010 : Barry GervinBarry Gervin
1.4K views44 slides
Introduction to AngularJS by
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSDavid Parsons
1.7K views26 slides
AngularJS by
AngularJSAngularJS
AngularJSErmir Hoxhaj
174 views5 slides
Introduction to AngularJS by
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSShyjal Raazi
369 views16 slides

More Related Content

What's hot

Single page application 03 by
Single page application   03Single page application   03
Single page application 03Ismaeel Enjreny
316 views9 slides
Angularjs PPT by
Angularjs PPTAngularjs PPT
Angularjs PPTAmit Baghel
5.7K views24 slides
Angular js by
Angular jsAngular js
Angular jsMindtree
283 views14 slides
Why Use MVC? by
Why Use MVC?Why Use MVC?
Why Use MVC?Jesse Anderson
18.4K views4 slides
Introduction to Angularjs : kishan kumar by
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarAppfinz Technologies
19 views19 slides
Angular JS training institute in Jaipur by
           Angular JS training institute in Jaipur           Angular JS training institute in Jaipur
Angular JS training institute in JaipurHEMANT SAXENA
18 views9 slides

What's hot(20)

Angularjs PPT by Amit Baghel
Angularjs PPTAngularjs PPT
Angularjs PPT
Amit Baghel5.7K views
Angular js by Mindtree
Angular jsAngular js
Angular js
Mindtree283 views
Angular JS training institute in Jaipur by HEMANT SAXENA
           Angular JS training institute in Jaipur           Angular JS training institute in Jaipur
Angular JS training institute in Jaipur
HEMANT SAXENA18 views
Angular.js presentation by Moran Fine
Angular.js presentationAngular.js presentation
Angular.js presentation
Moran Fine375 views
Angular js for web development by Mindfire LLC
Angular js for web developmentAngular js for web development
Angular js for web development
Mindfire LLC15 views
ASP.NET MVC 3 by Buu Nguyen
ASP.NET MVC 3ASP.NET MVC 3
ASP.NET MVC 3
Buu Nguyen6.2K views
Angular js- 1.X by Nitin Giri
Angular js- 1.XAngular js- 1.X
Angular js- 1.X
Nitin Giri154 views
Angularjs overview by VickyCmd
Angularjs  overviewAngularjs  overview
Angularjs overview
VickyCmd63 views
How to Build Dynamic Forms in Angular Directive with a Backend by Backand Cohen
How to Build Dynamic Forms in Angular Directive with a BackendHow to Build Dynamic Forms in Angular Directive with a Backend
How to Build Dynamic Forms in Angular Directive with a Backend
Backand Cohen536 views
Component based architecture by Zaiyang Li
Component based architectureComponent based architecture
Component based architecture
Zaiyang Li559 views
Ise312 Ec Presentation Jquery by duygut
Ise312 Ec Presentation JqueryIse312 Ec Presentation Jquery
Ise312 Ec Presentation Jquery
duygut418 views

Viewers also liked

Curso de Rails 3 by
Curso de Rails 3Curso de Rails 3
Curso de Rails 3Carlos Emanuel Mathiasen
218 views19 slides
國光石化簡介 by
國光石化簡介國光石化簡介
國光石化簡介zoayzoay
367 views11 slides
國光石化整合版Final by
國光石化整合版Final國光石化整合版Final
國光石化整合版Finalzoayzoay
378 views49 slides
Tomo 5.violencia y maltrato.aragon by
Tomo 5.violencia y maltrato.aragonTomo 5.violencia y maltrato.aragon
Tomo 5.violencia y maltrato.aragonBego Vilches
184 views90 slides
Beethoven 9.symphonie breitkopf_reinecke by
Beethoven 9.symphonie breitkopf_reineckeBeethoven 9.symphonie breitkopf_reinecke
Beethoven 9.symphonie breitkopf_reineckeAna Rita Monteiro
181 views63 slides
Hardy 001 jazz by
Hardy 001 jazzHardy 001 jazz
Hardy 001 jazzAna Rita Monteiro
267 views3 slides

Viewers also liked(18)

國光石化簡介 by zoayzoay
國光石化簡介國光石化簡介
國光石化簡介
zoayzoay367 views
國光石化整合版Final by zoayzoay
國光石化整合版Final國光石化整合版Final
國光石化整合版Final
zoayzoay378 views
Tomo 5.violencia y maltrato.aragon by Bego Vilches
Tomo 5.violencia y maltrato.aragonTomo 5.violencia y maltrato.aragon
Tomo 5.violencia y maltrato.aragon
Bego Vilches184 views
Beethoven 9.symphonie breitkopf_reinecke by Ana Rita Monteiro
Beethoven 9.symphonie breitkopf_reineckeBeethoven 9.symphonie breitkopf_reinecke
Beethoven 9.symphonie breitkopf_reinecke
Ana Rita Monteiro181 views
Tomo 9.escuela.aragon by Bego Vilches
Tomo 9.escuela.aragonTomo 9.escuela.aragon
Tomo 9.escuela.aragon
Bego Vilches266 views
Tomo 4.consumo de sustancias y salud sexual.aragon by Bego Vilches
Tomo 4.consumo de sustancias y salud sexual.aragonTomo 4.consumo de sustancias y salud sexual.aragon
Tomo 4.consumo de sustancias y salud sexual.aragon
Bego Vilches206 views
Tomo 8.tiempo libre.aragon by Bego Vilches
Tomo 8.tiempo libre.aragonTomo 8.tiempo libre.aragon
Tomo 8.tiempo libre.aragon
Bego Vilches307 views
Temple 2 by Busada
Temple 2Temple 2
Temple 2
Busada822 views
Childrens book project by Busada
Childrens book projectChildrens book project
Childrens book project
Busada224 views
Tomo 2.alimentacion y dieta.aragon by Bego Vilches
Tomo 2.alimentacion y dieta.aragonTomo 2.alimentacion y dieta.aragon
Tomo 2.alimentacion y dieta.aragon
Bego Vilches203 views
Confronting the reaper by Busada
Confronting the reaperConfronting the reaper
Confronting the reaper
Busada399 views
Semantic Interpretation of User Query for Question Answering on Interlinked Data by Saeedeh Shekarpour
Semantic Interpretation of User Query for Question Answering on Interlinked DataSemantic Interpretation of User Query for Question Answering on Interlinked Data
Semantic Interpretation of User Query for Question Answering on Interlinked Data
Saeedeh Shekarpour1.4K views
Tutorial on Question Answering Systems by Saeedeh Shekarpour
Tutorial on Question Answering Systems Tutorial on Question Answering Systems
Tutorial on Question Answering Systems
Saeedeh Shekarpour11.6K views

Similar to Itroducing Angular JS

What are the key distinctions between Angular and AngularJS? by
What are the key distinctions between Angular and AngularJS?What are the key distinctions between Angular and AngularJS?
What are the key distinctions between Angular and AngularJS?Albiorix Technology
58 views24 slides
5 benefits of angular js by
5 benefits of angular js5 benefits of angular js
5 benefits of angular jsOnGraph Technologies Pvt. Ltd.
70 views5 slides
AngularJS is awesome by
AngularJS is awesomeAngularJS is awesome
AngularJS is awesomeEusebiu Schipor
352 views34 slides
Angularjs basic part01 by
Angularjs basic part01Angularjs basic part01
Angularjs basic part01Mohd Abdul Baquee
254 views29 slides
Angular js up & running by
Angular js up & runningAngular js up & running
Angular js up & runningJunaid Baloch
554 views18 slides
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf by
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdfangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdfsarah david
2 views1 slide

Similar to Itroducing Angular JS(20)

What are the key distinctions between Angular and AngularJS? by Albiorix Technology
What are the key distinctions between Angular and AngularJS?What are the key distinctions between Angular and AngularJS?
What are the key distinctions between Angular and AngularJS?
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf by sarah david
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdfangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
sarah david2 views
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx by sarah david
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
sarah david4 views
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf by sarah david
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdfangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
sarah david2 views
Angular js 1.3 presentation for fed nov 2014 by Sarah Hudson
Angular js 1.3 presentation for fed   nov 2014Angular js 1.3 presentation for fed   nov 2014
Angular js 1.3 presentation for fed nov 2014
Sarah Hudson1.4K views
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx by sarah david
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
sarah david2 views
Angular js getting started by Hemant Mali
Angular js getting startedAngular js getting started
Angular js getting started
Hemant Mali550 views
Angular js by ymtech
Angular jsAngular js
Angular js
ymtech887 views
A perfect choice for web apps by adhyathakkar10
A perfect choice for web apps A perfect choice for web apps
A perfect choice for web apps
adhyathakkar1016 views

Recently uploaded

Lilypad @ Labweek, Istanbul, 2023.pdf by
Lilypad @ Labweek, Istanbul, 2023.pdfLilypad @ Labweek, Istanbul, 2023.pdf
Lilypad @ Labweek, Istanbul, 2023.pdfAlly339821
9 views45 slides
Voice Logger - Telephony Integration Solution at Aegis by
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at AegisNirmal Sharma
17 views1 slide
Perth MeetUp November 2023 by
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023 Michael Price
15 views44 slides
Case Study Copenhagen Energy and Business Central.pdf by
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdfAitana
12 views3 slides
From chaos to control: Managing migrations and Microsoft 365 with ShareGate! by
From chaos to control: Managing migrations and Microsoft 365 with ShareGate!From chaos to control: Managing migrations and Microsoft 365 with ShareGate!
From chaos to control: Managing migrations and Microsoft 365 with ShareGate!sammart93
9 views39 slides
Kyo - Functional Scala 2023.pdf by
Kyo - Functional Scala 2023.pdfKyo - Functional Scala 2023.pdf
Kyo - Functional Scala 2023.pdfFlavio W. Brasil
165 views92 slides

Recently uploaded(20)

Lilypad @ Labweek, Istanbul, 2023.pdf by Ally339821
Lilypad @ Labweek, Istanbul, 2023.pdfLilypad @ Labweek, Istanbul, 2023.pdf
Lilypad @ Labweek, Istanbul, 2023.pdf
Ally3398219 views
Voice Logger - Telephony Integration Solution at Aegis by Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma17 views
Perth MeetUp November 2023 by Michael Price
Perth MeetUp November 2023 Perth MeetUp November 2023
Perth MeetUp November 2023
Michael Price15 views
Case Study Copenhagen Energy and Business Central.pdf by Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana12 views
From chaos to control: Managing migrations and Microsoft 365 with ShareGate! by sammart93
From chaos to control: Managing migrations and Microsoft 365 with ShareGate!From chaos to control: Managing migrations and Microsoft 365 with ShareGate!
From chaos to control: Managing migrations and Microsoft 365 with ShareGate!
sammart939 views
Attacking IoT Devices from a Web Perspective - Linux Day by Simone Onofri
Attacking IoT Devices from a Web Perspective - Linux Day Attacking IoT Devices from a Web Perspective - Linux Day
Attacking IoT Devices from a Web Perspective - Linux Day
Simone Onofri15 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab15 views
6g - REPORT.pdf by Liveplex
6g - REPORT.pdf6g - REPORT.pdf
6g - REPORT.pdf
Liveplex9 views
1st parposal presentation.pptx by i238212
1st parposal presentation.pptx1st parposal presentation.pptx
1st parposal presentation.pptx
i2382129 views
handbook for web 3 adoption.pdf by Liveplex
handbook for web 3 adoption.pdfhandbook for web 3 adoption.pdf
handbook for web 3 adoption.pdf
Liveplex19 views
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2216 views

Itroducing Angular JS

  • 1. Angular JS AngularJS is a toolset for building the framework most suited to your application development. It is fully extensible and works well with other libraries. Every feature can be modified or replaced to suit your unique development workflow and feature needs.
  • 2. Concepts There are a few core ideas that you’ll use throughout an Angular app. As it turns out, we didn’t invent any of these. Instead, we’ve borrowed heavily from successful idioms in other development environments and implemented them in a way that embraces HTML, browsers, and many other familiar web standards.
  • 3. Concepts ● Client-Side Templates ● Model View Controller (MVC) ● Data Binding ● Dependency Injection ● Directives
  • 4. Client-Side Templates ● ● Multi-page web applications create their HTML by assembling and joining it with data on the server, and then shipping the finished pages up to the browser. Angular is different in that the template and data get shipped to the browser to be assembled there.
  • 5. Client-Side Templates ● ● ● ● ● There are no classes or IDs in the HTML to identify where to attach event listeners. When HelloController set the greeting.text to Hello, we didn’t have to register any event listeners or write any callbacks. HelloController is a plain JavaScript class, and doesn’t inherit from anything. HelloController got the $scope object that it needed without having to create it. We didn’t have to call the HelloController’s constructor ourselves
  • 7. ● ● ● Model View Controller (MVC) MVC application structure was introduced in the 1970s as part of Smalltalk. The core idea behind MVC is that you have clear separation in your code between managing its data (model), the application logic (controller), and presenting the data to the user (view).
  • 8. ● ● Model View Controller (MVC) The view is the Document Object Model (DOM) ● The controllers are JavaScript classes ● The model data is stored in object properties.
  • 9. Data Binding ● ● ● Before AJAX single-page apps were common, platforms like Rails, PHP, or JSP helped us create the user interface (UI) by merging strings of HTML with data before sending it to the users to display it. Libraries like jQuery extended this model to the client and let us follow a similar style, but with the ability to update, part of the DOM separately, rather than updating the whole page.
  • 10. Data Binding ● This all works pretty well, but when you want to insert fresher data into the UI, or change the data based on user input, you need to do quite a bit of non-trivial work to make sure you get the data into the correct state, both in the UI and in JavaScript properties.
  • 11. Data Binding ● ● ● But what if we could have all this work done for us without writing code? What if we could just declare which parts of the UI map to which JavaScript properties and have them sync automatically? This style of programming is called binding. data
  • 13. Dependency Injection ● ● ● The $scope object that does our data binding is passed to us automatically We didn’t have to create it by calling any function. We just asked for it by putting it in HelloController’s constructor.
  • 14. Dependency Injection ● ● ● We get this magical effect through Angular’s dependency injection system. Dependency injection lets us follow a development style in which, instead of creating dependencies, our classes just ask for what they need. This follows a design pattern called the Law of Demeter, also known as the principle of least knowledge.
  • 15. Directives ● ● One of the best parts of Angular is that you can write your templates as HTML. You can do this because at the core of the framework we’ve included a powerful DOM transformation engine that lets you extend HTML’s syntax.
  • 16. Directives ● ● ● ● Double-curly( {{ something }} ) notation for data binding. ng-app directive lets you tell Angular which part of your page it should expect to manage ng-controller for specifying which controller oversees which part of the view. ng-model, which binds an input to part of the model. ● And more... ● And you can write your own