SlideShare a Scribd company logo
2
Most read
13
Most read
14
Most read
ANGULARJS
HTML enhanced for web apps!
What is ANGULARJS?
• It’s not a JavaScript library (As they say). There are no
functions which we can directly call and use.
• It is not a DOM manipulation library like jQuery. But it
uses subset of jQuery for DOM manipulation (called
jqLite).
• Focus more on HTML side of web apps.
• For MVC/MVVM design pattern
• AngularJS is a Javascript MVC framework created by
Google to build properly architectured and
maintenable web applications.
Philosophy
“ANGULARJS is what HTML could have been if it had been designed for web application development.”
“”ANGULARJS is built around the philosophy that declarative code is better than imperative code while building
UIs and wiring different components of web application together.”
<!doctype html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
</head>
<body>
<div>
<label>Name:</label>
<input type="text" ng-model="yourName" placeholder="Enter a name here">
<hr>
<h1>Hello {{yourName}}!</h1>
</div>
</body>
</html>
Why ANGULARJS?
• Defines numerous ways to organize web application at client side.
• Enhances HTML by attaching directives, custom tags, attributes, expressions, templates within HTML.
• Encourage TDD
• Encourage MVC/MVVM design pattern
• Code Reuse
• Good for Single Page Apps (SPA)
• Cool Features -> Next Slide
Key Features of ANGULARJS
• Declarative HTML approach
• Easy Data Binding : Two way Data Binding
• Reusable Components
• MVC/MVVM Design Pattern
• Dependency Injection
• End to end Integration Testing / Unit Testing
• Routing
• Templating
• Modules
• Services
• Expressions
• Filters
• Directives
• Form Validation
• $scope, $http, $routeProvider…
MVC : Model View Controller
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
View :
• Renders the Model data
• Send User actions/events to controller
• UI
Controller:
• Define Application Behavior
• Maps user actions to Model
• Select view for response
Model:
• Business Logic
• Notify view changes
• Application Functionality
• Data in general
MVVM: Model View ViewModel
View
ViewModelModel
UI
Presentation LogicBusiness Logic
and Data
• User actions, commands
• Data binding
• Notifications
• Data Access
• Update ViewModel about change
ng-app
Use this directive to auto-bootstrap an application.
Only one ng-app directive can be used per HTML document
<html ng-app>
HTML Compiler
Angular's HTML compiler allows the developer to teach the browser new HTML syntax. The compiler allows
you to attach behavior to any HTML element or attribute and even create new HTML elements or attributes
with custom behavior. Angular calls these behavior extensions directives.
Compiler is an angular service which traverses the DOM looking for attributes. The compilation process
happens in two phases.
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.
http://docs.angularjs.org/guide/compiler
Directive
The directives can be placed in element names, attributes, class names, as well as
comments. Directives are a way to teach HTML new tricks.
A directive is just a function which executes when the compiler encounters it in the DOM.
<input ng-model='name'>
Custom Defined Directives
<span draggable>Drag ME</span>
Expression
Expressions are JavaScript-like code snippets that are usually placed in bindings such as {{
expression }}
<body>
1+2={{1+2}}
</body>
Forms
Form and controls provide validation services, so that the user can be notified of invalid
input. This provides a better user experience, because the user gets instant feedback on
how to correct the error.
<input type="text" ng-model="user.name" name="uName" required />
<button ng-click="update(user)“ ng-disabled="form.$invalid ||
isUnchanged(user)">SAVE</button>
Module
Modules declaratively specify how an application should be bootstrapped.
There can be multiple modules in an app
Those could be interdependent too.
// declare a module
var myAppModule = angular.module('myApp', [--here goes the dependent Modules--]);
Modules are configured with routes, controllers, models etc.
Routing
It Is used for deep-linking URLs to controllers and views (HTML partials). It watches $location.url() and
tries to map the path to an existing route definition.
$routeProvider.when('/Book', {
template: 'examples/book.html',
controller: BookCntl,
});
$routeProvider.when('/Book/chapter01', {
template: 'examples/chapter01.html',
controller: ChapterCntl,
});
Scope
Scope is an object that refers to the application model.
It is an execution context for expressions.
Scopes are arranged in hierarchical structure which mimic the DOM structure of the
application.
Scopes can watch expressions and propagate events.
Actually the ViewModel of MVVM.
$scope
Dependency Injection
Dependency Injection (DI) is a software design pattern that deals with how code gets hold
of its dependencies.
Filters
Angular filters format data for display to the user.
{{ expression [| filter_name[:parameter_value] ... ] }}
{{ uppercase_expression | uppercase }}
{{ expression | filter1 | filter2 }}
Can create custom filters
Resources
Documentation
• AngularJS Developer Guide
• AngularJS API
• AngularJS Tutorial
Videos
• AngularJS Fundamentals In 60-ish Minutes
• Introduction to Angular JS
• AngularJS end-to-end web app tutorial Part I
Manish
Shekhawat
twitter.com/manishekhawat
www.facebook.com/manishekhawat

More Related Content

What's hot (20)

PPTX
Java Server Pages(jsp)
Manisha Keim
 
PPT
JavaScript - An Introduction
Manvendra Singh
 
PPT
Java Script ppt
Priya Goyal
 
PDF
Hibernate Presentation
guest11106b
 
PDF
Javascript basics
shreesenthil
 
PDF
Basics of JavaScript
Bala Narayanan
 
PPSX
Sessions and cookies
www.netgains.org
 
PPT
Js ppt
Rakhi Thota
 
PPT
JavaScript & Dom Manipulation
Mohammed Arif
 
PPTX
Javascript 101
Shlomi Komemi
 
PDF
Html / CSS Presentation
Shawn Calvert
 
PPTX
Java script
Abhishek Kesharwani
 
PPTX
Introduction to spring boot
Santosh Kumar Kar
 
PPTX
Lab #2: Introduction to Javascript
Walid Ashraf
 
PDF
Introduction to HTML5
Gil Fink
 
PDF
Javascript essentials
Bedis ElAchèche
 
PPTX
Introduction to ASP.NET
Rajkumarsoy
 
PPTX
Hibernate ppt
Aneega
 
PPTX
Introduction to AngularJS
David Parsons
 
PPTX
Event In JavaScript
ShahDhruv21
 
Java Server Pages(jsp)
Manisha Keim
 
JavaScript - An Introduction
Manvendra Singh
 
Java Script ppt
Priya Goyal
 
Hibernate Presentation
guest11106b
 
Javascript basics
shreesenthil
 
Basics of JavaScript
Bala Narayanan
 
Sessions and cookies
www.netgains.org
 
Js ppt
Rakhi Thota
 
JavaScript & Dom Manipulation
Mohammed Arif
 
Javascript 101
Shlomi Komemi
 
Html / CSS Presentation
Shawn Calvert
 
Java script
Abhishek Kesharwani
 
Introduction to spring boot
Santosh Kumar Kar
 
Lab #2: Introduction to Javascript
Walid Ashraf
 
Introduction to HTML5
Gil Fink
 
Javascript essentials
Bedis ElAchèche
 
Introduction to ASP.NET
Rajkumarsoy
 
Hibernate ppt
Aneega
 
Introduction to AngularJS
David Parsons
 
Event In JavaScript
ShahDhruv21
 

Viewers also liked (6)

PDF
Angular Seminar [한빛미디어 리얼타임 세미나]
Woojin Joe
 
PPTX
Angular vs. React
OPITZ CONSULTING Deutschland
 
PDF
Angular Extreme Performance
Gustavo Costa
 
PDF
Building Universal Applications with Angular 2
Minko Gechev
 
PDF
Getting Started with Angular 2
FITC
 
ODP
Introduction to Angular 2
Knoldus Inc.
 
Angular Seminar [한빛미디어 리얼타임 세미나]
Woojin Joe
 
Angular vs. React
OPITZ CONSULTING Deutschland
 
Angular Extreme Performance
Gustavo Costa
 
Building Universal Applications with Angular 2
Minko Gechev
 
Getting Started with Angular 2
FITC
 
Introduction to Angular 2
Knoldus Inc.
 
Ad

Similar to Introduction to Angularjs (20)

PDF
Introduction to Angular Js
Professional Guru
 
PPTX
Angularjs
Sabin Tamrakar
 
PDF
One Weekend With AngularJS
Yashobanta Bai
 
PPTX
Angular workshop - Full Development Guide
Nitin Giri
 
PPTX
Introduction to AngularJs
murtazahaveliwala
 
PPTX
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
PPTX
Angular JS - Introduction
Sagar Acharya
 
PDF
Everything You Need To Know About AngularJS
Sina Mirhejazi
 
PDF
Wt unit 5 client &amp; server side framework
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
PDF
AngularJs
Abdhesh Kumar
 
PDF
Angularjs 131211063348-phpapp01
Arunangsu Sahu
 
PPTX
Introduction to single page application with angular js
Mindfire Solutions
 
PDF
Angular js
Knoldus Inc.
 
PPTX
AngularJS is awesome
Eusebiu Schipor
 
PPTX
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
PPTX
Angular JS, A dive to concepts
Abhishek Sur
 
PPTX
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
PPTX
Training On Angular Js
Mahima Radhakrishnan
 
PPTX
Angularjs basic part01
Mohd Abdul Baquee
 
Introduction to Angular Js
Professional Guru
 
Angularjs
Sabin Tamrakar
 
One Weekend With AngularJS
Yashobanta Bai
 
Angular workshop - Full Development Guide
Nitin Giri
 
Introduction to AngularJs
murtazahaveliwala
 
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
Angular JS - Introduction
Sagar Acharya
 
Everything You Need To Know About AngularJS
Sina Mirhejazi
 
Wt unit 5 client &amp; server side framework
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
AngularJs
Abdhesh Kumar
 
Angularjs 131211063348-phpapp01
Arunangsu Sahu
 
Introduction to single page application with angular js
Mindfire Solutions
 
Angular js
Knoldus Inc.
 
AngularJS is awesome
Eusebiu Schipor
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
Angular JS, A dive to concepts
Abhishek Sur
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
Training On Angular Js
Mahima Radhakrishnan
 
Angularjs basic part01
Mohd Abdul Baquee
 
Ad

Recently uploaded (20)

PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
PPT
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Ericsson LTE presentation SEMINAR 2010.ppt
npat3
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 

Introduction to Angularjs

  • 2. What is ANGULARJS? • It’s not a JavaScript library (As they say). There are no functions which we can directly call and use. • It is not a DOM manipulation library like jQuery. But it uses subset of jQuery for DOM manipulation (called jqLite). • Focus more on HTML side of web apps. • For MVC/MVVM design pattern • AngularJS is a Javascript MVC framework created by Google to build properly architectured and maintenable web applications.
  • 3. Philosophy “ANGULARJS is what HTML could have been if it had been designed for web application development.” “”ANGULARJS is built around the philosophy that declarative code is better than imperative code while building UIs and wiring different components of web application together.” <!doctype html> <html ng-app> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> </head> <body> <div> <label>Name:</label> <input type="text" ng-model="yourName" placeholder="Enter a name here"> <hr> <h1>Hello {{yourName}}!</h1> </div> </body> </html>
  • 4. Why ANGULARJS? • Defines numerous ways to organize web application at client side. • Enhances HTML by attaching directives, custom tags, attributes, expressions, templates within HTML. • Encourage TDD • Encourage MVC/MVVM design pattern • Code Reuse • Good for Single Page Apps (SPA) • Cool Features -> Next Slide
  • 5. Key Features of ANGULARJS • Declarative HTML approach • Easy Data Binding : Two way Data Binding • Reusable Components • MVC/MVVM Design Pattern • Dependency Injection • End to end Integration Testing / Unit Testing • Routing • Templating • Modules • Services • Expressions • Filters • Directives • Form Validation • $scope, $http, $routeProvider…
  • 6. MVC : Model View Controller 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 View : • Renders the Model data • Send User actions/events to controller • UI Controller: • Define Application Behavior • Maps user actions to Model • Select view for response Model: • Business Logic • Notify view changes • Application Functionality • Data in general
  • 7. MVVM: Model View ViewModel View ViewModelModel UI Presentation LogicBusiness Logic and Data • User actions, commands • Data binding • Notifications • Data Access • Update ViewModel about change
  • 8. ng-app Use this directive to auto-bootstrap an application. Only one ng-app directive can be used per HTML document <html ng-app>
  • 9. HTML Compiler Angular's HTML compiler allows the developer to teach the browser new HTML syntax. The compiler allows you to attach behavior to any HTML element or attribute and even create new HTML elements or attributes with custom behavior. Angular calls these behavior extensions directives. Compiler is an angular service which traverses the DOM looking for attributes. The compilation process happens in two phases. 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. http://docs.angularjs.org/guide/compiler
  • 10. Directive The directives can be placed in element names, attributes, class names, as well as comments. Directives are a way to teach HTML new tricks. A directive is just a function which executes when the compiler encounters it in the DOM. <input ng-model='name'> Custom Defined Directives <span draggable>Drag ME</span>
  • 11. Expression Expressions are JavaScript-like code snippets that are usually placed in bindings such as {{ expression }} <body> 1+2={{1+2}} </body>
  • 12. Forms Form and controls provide validation services, so that the user can be notified of invalid input. This provides a better user experience, because the user gets instant feedback on how to correct the error. <input type="text" ng-model="user.name" name="uName" required /> <button ng-click="update(user)“ ng-disabled="form.$invalid || isUnchanged(user)">SAVE</button>
  • 13. Module Modules declaratively specify how an application should be bootstrapped. There can be multiple modules in an app Those could be interdependent too. // declare a module var myAppModule = angular.module('myApp', [--here goes the dependent Modules--]); Modules are configured with routes, controllers, models etc.
  • 14. Routing It Is used for deep-linking URLs to controllers and views (HTML partials). It watches $location.url() and tries to map the path to an existing route definition. $routeProvider.when('/Book', { template: 'examples/book.html', controller: BookCntl, }); $routeProvider.when('/Book/chapter01', { template: 'examples/chapter01.html', controller: ChapterCntl, });
  • 15. Scope Scope is an object that refers to the application model. It is an execution context for expressions. Scopes are arranged in hierarchical structure which mimic the DOM structure of the application. Scopes can watch expressions and propagate events. Actually the ViewModel of MVVM. $scope
  • 16. Dependency Injection Dependency Injection (DI) is a software design pattern that deals with how code gets hold of its dependencies.
  • 17. Filters Angular filters format data for display to the user. {{ expression [| filter_name[:parameter_value] ... ] }} {{ uppercase_expression | uppercase }} {{ expression | filter1 | filter2 }} Can create custom filters
  • 18. Resources Documentation • AngularJS Developer Guide • AngularJS API • AngularJS Tutorial Videos • AngularJS Fundamentals In 60-ish Minutes • Introduction to Angular JS • AngularJS end-to-end web app tutorial Part I

Editor's Notes

  • #20: In Slide Show mode, click the arrow to enter the PowerPoint Getting Started Center.