SlideShare a Scribd company logo
ANGULARJS
HTML enhanced for web apps!
By Professional Guru
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.
http://professional-guru.com
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> http://professional-guru.com
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
http://professional-guru.com
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…
http://professional-guru.com
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
http://professional-guru.com
MVVM: Model View ViewModel
View
ViewModelModel
UI
Presentation LogicBusiness Logic
and Data
• User actions, commands
• Data binding
• Notifications
• Data Access
• Update ViewModel about change
http://professional-guru.com
ng-app
Use this directive to auto-bootstrap an application.
Only one ng-app directive can be used per HTML document
<html ng-app>
http://professional-guru.com
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
http://professional-guru.com
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>
http://professional-guru.com
Expression
Expressions are JavaScript-like code snippets that are usually placed in bindings such as {{
expression }}
<body>
1+2={{1+2}}
</body>
http://professional-guru.com
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>
http://professional-guru.com
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.
http://professional-guru.com
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,
});
http://professional-guru.com
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
http://professional-guru.com
Dependency Injection
Dependency Injection (DI) is a software design pattern that deals with how code gets hold
of its dependencies.
http://professional-guru.com
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
http://professional-guru.com

More Related Content

What's hot (20)

PPTX
Angularjs PPT
Amit Baghel
 
PPTX
Overview about AngularJS Framework
Camilo Lopes
 
PDF
Angularjs tutorial
HarikaReddy115
 
PPTX
MVVM In Use
Chris Charabaruk
 
PPTX
Introduction to AngularJS Framework
Raveendra R
 
PPTX
Introduction to Android Programming
Raveendra R
 
PPT
ASP .net MVC
Divya Sharma
 
PPTX
Intro to angular
Zach Barnes
 
PPTX
Introduction to angular js for .net developers
Mohd Manzoor Ahmed
 
PPT
CTTDNUG ASP.NET MVC
Barry Gervin
 
PPTX
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
PPTX
ASP .NET MVC Introduction & Guidelines
Dev Raj Gautam
 
PPTX
3-TIER ARCHITECTURE IN ASP.NET MVC
Mohd Manzoor Ahmed
 
PPTX
Angular js
vu van quyet
 
PDF
AngularJS : Superheroic JavaScript MVW Framework
Edureka!
 
PPT
introduction to Angularjs basics
Ravindra K
 
PDF
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
PPTX
Angularjs Live Project
Mohd Manzoor Ahmed
 
PDF
MVC Seminar Presantation
Abhishek Yadav
 
PDF
ASP.NET MVC 3
Buu Nguyen
 
Angularjs PPT
Amit Baghel
 
Overview about AngularJS Framework
Camilo Lopes
 
Angularjs tutorial
HarikaReddy115
 
MVVM In Use
Chris Charabaruk
 
Introduction to AngularJS Framework
Raveendra R
 
Introduction to Android Programming
Raveendra R
 
ASP .net MVC
Divya Sharma
 
Intro to angular
Zach Barnes
 
Introduction to angular js for .net developers
Mohd Manzoor Ahmed
 
CTTDNUG ASP.NET MVC
Barry Gervin
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
ASP .NET MVC Introduction & Guidelines
Dev Raj Gautam
 
3-TIER ARCHITECTURE IN ASP.NET MVC
Mohd Manzoor Ahmed
 
Angular js
vu van quyet
 
AngularJS : Superheroic JavaScript MVW Framework
Edureka!
 
introduction to Angularjs basics
Ravindra K
 
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
Angularjs Live Project
Mohd Manzoor Ahmed
 
MVC Seminar Presantation
Abhishek Yadav
 
ASP.NET MVC 3
Buu Nguyen
 

Similar to Introduction to Angular Js (20)

PPTX
Introduction to Angularjs
Manish Shekhawat
 
PPTX
Angular JS - Introduction
Sagar Acharya
 
PPTX
Angular JS, A dive to concepts
Abhishek Sur
 
PPTX
Introduction to AngularJs
murtazahaveliwala
 
PPTX
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
PDF
Getting Started With AngularJS
Edureka!
 
PPTX
Angular workshop - Full Development Guide
Nitin Giri
 
PPTX
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
PDF
One Weekend With AngularJS
Yashobanta Bai
 
PDF
Everything You Need To Know About AngularJS
Sina Mirhejazi
 
PDF
AngularJS for Beginners
Edureka!
 
PPTX
Angularjs
Sabin Tamrakar
 
PDF
Getting Started with AngularJS
Edureka!
 
PPTX
Introduction to single page application with angular js
Mindfire Solutions
 
PDF
Introduction to Angular Js
Professional Guru
 
PPTX
Basics of AngularJS
Filip Janevski
 
PPTX
Training On Angular Js
Mahima Radhakrishnan
 
PPTX
AngularJS Introduction, how to run Angular
SamuelJohnpeter
 
Introduction to Angularjs
Manish Shekhawat
 
Angular JS - Introduction
Sagar Acharya
 
Angular JS, A dive to concepts
Abhishek Sur
 
Introduction to AngularJs
murtazahaveliwala
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
Getting Started With AngularJS
Edureka!
 
Angular workshop - Full Development Guide
Nitin Giri
 
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
One Weekend With AngularJS
Yashobanta Bai
 
Everything You Need To Know About AngularJS
Sina Mirhejazi
 
AngularJS for Beginners
Edureka!
 
Angularjs
Sabin Tamrakar
 
Getting Started with AngularJS
Edureka!
 
Introduction to single page application with angular js
Mindfire Solutions
 
Introduction to Angular Js
Professional Guru
 
Basics of AngularJS
Filip Janevski
 
Training On Angular Js
Mahima Radhakrishnan
 
AngularJS Introduction, how to run Angular
SamuelJohnpeter
 
Ad

More from Professional Guru (20)

PPTX
introduction to AWs
Professional Guru
 
PDF
introduction to AWs
Professional Guru
 
PDF
Introduction to JAVA
Professional Guru
 
PDF
Introduction to Java
Professional Guru
 
PDF
Introduction to Big Data
Professional Guru
 
PPT
Introduction to Azure
Professional Guru
 
PDF
introduction to DEVOPS
Professional Guru
 
PDF
Introduction to Azure
Professional Guru
 
PDF
Introduction to Java
Professional Guru
 
PDF
Dev ops concept
Professional Guru
 
PDF
Robotic Process Automation
Professional Guru
 
PDF
Dev ops concept
Professional Guru
 
PDF
Introduction to AWS
Professional Guru
 
PDF
introduction to hadoop
Professional Guru
 
PDF
Introduction to SQL SERVER
Professional Guru
 
PDF
Introduction to Java
Professional Guru
 
PDF
Introduction to Azure
Professional Guru
 
PDF
Introduction to HTML
Professional Guru
 
PDF
Rpa developer resume
Professional Guru
 
PDF
ANDROID DEVELOPMENT DEMO
Professional Guru
 
introduction to AWs
Professional Guru
 
introduction to AWs
Professional Guru
 
Introduction to JAVA
Professional Guru
 
Introduction to Java
Professional Guru
 
Introduction to Big Data
Professional Guru
 
Introduction to Azure
Professional Guru
 
introduction to DEVOPS
Professional Guru
 
Introduction to Azure
Professional Guru
 
Introduction to Java
Professional Guru
 
Dev ops concept
Professional Guru
 
Robotic Process Automation
Professional Guru
 
Dev ops concept
Professional Guru
 
Introduction to AWS
Professional Guru
 
introduction to hadoop
Professional Guru
 
Introduction to SQL SERVER
Professional Guru
 
Introduction to Java
Professional Guru
 
Introduction to Azure
Professional Guru
 
Introduction to HTML
Professional Guru
 
Rpa developer resume
Professional Guru
 
ANDROID DEVELOPMENT DEMO
Professional Guru
 
Ad

Recently uploaded (20)

PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PPTX
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
PPTX
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
PPTX
Introduction to Indian Writing in English
Trushali Dodiya
 
PDF
epi editorial commitee meeting presentation
MIPLM
 
PPTX
Difference between write and update in odoo 18
Celine George
 
PDF
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PPTX
TRANSLATIONAL AND ROTATIONAL MOTION.pptx
KIPAIZAGABAWA1
 
PDF
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PDF
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PDF
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
PPTX
DIGITAL CITIZENSHIP TOPIC TLE 8 MATATAG CURRICULUM
ROBERTAUGUSTINEFRANC
 
PPTX
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PDF
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
Introduction to Indian Writing in English
Trushali Dodiya
 
epi editorial commitee meeting presentation
MIPLM
 
Difference between write and update in odoo 18
Celine George
 
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
TRANSLATIONAL AND ROTATIONAL MOTION.pptx
KIPAIZAGABAWA1
 
Women's Health: Essential Tips for Every Stage.pdf
Iftikhar Ahmed
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
Governor Josh Stein letter to NC delegation of U.S. House
Mebane Rash
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
DIGITAL CITIZENSHIP TOPIC TLE 8 MATATAG CURRICULUM
ROBERTAUGUSTINEFRANC
 
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 

Introduction to Angular Js

  • 1. ANGULARJS HTML enhanced for web apps! By Professional Guru
  • 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. http://professional-guru.com
  • 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> http://professional-guru.com
  • 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 http://professional-guru.com
  • 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… http://professional-guru.com
  • 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 http://professional-guru.com
  • 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 http://professional-guru.com
  • 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> http://professional-guru.com
  • 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 http://professional-guru.com
  • 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> http://professional-guru.com
  • 11. Expression Expressions are JavaScript-like code snippets that are usually placed in bindings such as {{ expression }} <body> 1+2={{1+2}} </body> http://professional-guru.com
  • 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> http://professional-guru.com
  • 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. http://professional-guru.com
  • 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, }); http://professional-guru.com
  • 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 http://professional-guru.com
  • 16. Dependency Injection Dependency Injection (DI) is a software design pattern that deals with how code gets hold of its dependencies. http://professional-guru.com
  • 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 http://professional-guru.com