SlideShare a Scribd company logo
Working with Angular JS, A dive to SPA!
~Abhishek Sur
Agenda
• Misunderstandings
• What is angular?
• SPAs
• Why angular?
• Features
• MVC/MVVM
• Directives, filters, expression
• Some cool Demo
Another JS Lib
Lots of new
learning
Difficult to learn
Useful for
web only
Used for styling
purpose
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).
What is ANGULAR JS? (contd…)
• 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.
• “ANGULARJS is what HTML could have been if it had been designed for web application
development.”
• AngularJS extends HTML with new attributes.
Single Page Application (SPA)
SPA Demo
http://www.myspa.com
View View
View View
The Challenge with SPAs
DOM Manipulation History
Routing
Module Loading
Data Binding
Object Modeling
Ajax/Promises
Caching
View Loading
Solution?
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
ngularJS is a full-featured
SPA framework
Data Binding MVC Routing
Templates
ViewModel Views
Controllers Dependency Injection
Directives
Testing
Controllers
jqLite
Validation
FactoriesHistory
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
What are Directives?
• 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>
What are Directives? (contd..)
<!DOCTYPE html>
<html ng-app>
<head>
<title></title>
</head>
<body>
<div class="container">
Name: <input type="text" ng-model="name" /> {{ name }}
</div>
<script src="Scripts/angular.js"></script>
</body>
</html>
Directive
Directive
Data Binding Expression
Iterating with ng-repeat Directive
<html data-ng-app="">
...
<div class="container"
data-ng-init="names=['Dave','Napur','Heedy','Shriva']">
<h3>Looping with the ng-repeat Directive</h3>
<ul>
<li data-ng-repeat="name in names">{{ name }}</li>
</ul>
</div>
...
</html>
Iterate through names
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
Using Filters
<ul>
<li data-ng-repeat="cust in customers | orderBy:'name'">
{{ cust.name | uppercase }}
</li>
</ul>
Order customers
by name property
<input type="text" data-ng-model="nameText" />
<ul>
<li data-ng-repeat="cust in customers | filter:nameText | orderBy:'name'">
{{ cust.name }} - {{ cust.city }}</li>
</ul>
Filter customers by model
value
Expression
Expressions are JavaScript-like code snippets that are usually placed in bindings such as {{
expression }}
<body>
1+2={{1+2}}
</body>
Demo
Why should we use Angular JS?
• Bootstrap features
• Directives for animation & effects for interactive UI
• SPA : modern way to represent WEB APP
• Compatible with mobile app development
Why Developer should use Angular JS?
• It is developed by google.
• RESTful actions (Using one line of JS you can quickly communicate with server)
• Dependency Injection (DI) is a software design pattern that deals with how components
get hold of their dependencies.
• Provides several options for testing (TDD)
• Flexibility with filters
• Good documentation & resources.
Some Statistics!
o Angular JS is 3 times faster than any external JS available till now ~Google.
More Statistics! (Interesting One)
• GITHUB Stats:
• Stars:
o if you star a repository, you basically want to show your appreciation as well as keep track of repositories
that you find interesting without it spamming your timeline.
o In top 3 of github stars project list, only bootstrap & node js is ahead of it.
o Check stars stats:
o https://github.com/search?utf8=%E2%9C%93&q=stars%3A%3E30000&type=Repositories&ref=searchresult
s
• fork:
o In software engineering, a project fork happens when developers take a legal copy of source code from one
software package and start independent development on it, creating a distinct piece of software.
o In top 7 of github fork project list.
o Check fork stats:
o https://github.com/search?utf8=%E2%9C%93&q=forks%3A%3E10000&type=Repositories&ref=searchresult
s
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
Angular JS, A dive to concepts
Abhishek Sur Email : contact@abhisheksur.com
Twitter: @abhi2434
Facebook : /abhi2434

More Related Content

What's hot (20)

PDF
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
PPTX
Angular js 1.3 presentation for fed nov 2014
Sarah Hudson
 
PPTX
Angular js 1.3 basic tutorial
Al-Mutaz Bellah Salahat
 
PPTX
Angular Js Get Started - Complete Course
EPAM Systems
 
PPTX
AngularJS intro
dizabl
 
PDF
AngularJS: Overview & Key Features
Mohamad Al Asmar
 
PPTX
AngularJs (1.x) Presentation
Raghubir Singh
 
PPTX
Introduction to single page application with angular js
Mindfire Solutions
 
PPTX
Angular js
Manav Prasad
 
PPTX
Angular Js Basics
أحمد عبد الوهاب
 
PPTX
Angular js 1.0-fundamentals
Venkatesh Narayanan
 
PPTX
Angular js
Mindtree
 
PPTX
Understanding angular js
Aayush Shrestha
 
PPTX
Angular js tutorial slides
samhelman
 
PPTX
AngularJS is awesome
Eusebiu Schipor
 
PPTX
Angular js PPT
Imtiyaz Ahmad Khan
 
PPTX
Angular js
Dinusha Nandika
 
PPTX
Angular JS
John Temoty Roca
 
PDF
Introduction of angular js
Tamer Solieman
 
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
Angular js 1.3 presentation for fed nov 2014
Sarah Hudson
 
Angular js 1.3 basic tutorial
Al-Mutaz Bellah Salahat
 
Angular Js Get Started - Complete Course
EPAM Systems
 
AngularJS intro
dizabl
 
AngularJS: Overview & Key Features
Mohamad Al Asmar
 
AngularJs (1.x) Presentation
Raghubir Singh
 
Introduction to single page application with angular js
Mindfire Solutions
 
Angular js
Manav Prasad
 
Angular Js Basics
أحمد عبد الوهاب
 
Angular js 1.0-fundamentals
Venkatesh Narayanan
 
Angular js
Mindtree
 
Understanding angular js
Aayush Shrestha
 
Angular js tutorial slides
samhelman
 
AngularJS is awesome
Eusebiu Schipor
 
Angular js PPT
Imtiyaz Ahmad Khan
 
Angular js
Dinusha Nandika
 
Angular JS
John Temoty Roca
 
Introduction of angular js
Tamer Solieman
 

Viewers also liked (14)

PDF
Blogs in OL_in_greek
Marianna Vivitsou
 
DOCX
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 효능,파퍼 효과,파퍼 성능,
agasg agas
 
PPTX
Episerver Ascend 2016 Roundup
Anna Bravington
 
DOCX
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 구입방법,파퍼 구입처,파퍼 구합니다,
agasg agas
 
DOCX
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 추천,파퍼 약모양,파퍼 약상태,
agasg agas
 
DOCX
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 정품 구하는방법,파퍼 거래,파퍼 조치법,
agasg agas
 
DOCX
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 정품직구,파퍼 정품팝니다,파퍼 정품구입합니다,
agasg agas
 
DOCX
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 추천,파퍼 부작용,파퍼 제조법,
agasg agas
 
DOCX
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 연예인,파퍼 제조사,파퍼 후기,
agasg agas
 
DOCX
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 정품구입,파퍼 정품파는곳,파퍼 정품구입처,
agasg agas
 
DOCX
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 처방받기,파퍼 필름형,파퍼 정품판매,
agasg agas
 
PPTX
Net neutrality for the layman
Venkatarangan Thirumalai
 
DOCX
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 차이,파퍼 강간뉴스,파퍼 냄새,
agasg agas
 
PDF
Lololol
israel yanez
 
Blogs in OL_in_greek
Marianna Vivitsou
 
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 효능,파퍼 효과,파퍼 성능,
agasg agas
 
Episerver Ascend 2016 Roundup
Anna Bravington
 
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 구입방법,파퍼 구입처,파퍼 구합니다,
agasg agas
 
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 추천,파퍼 약모양,파퍼 약상태,
agasg agas
 
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 정품 구하는방법,파퍼 거래,파퍼 조치법,
agasg agas
 
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 정품직구,파퍼 정품팝니다,파퍼 정품구입합니다,
agasg agas
 
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 추천,파퍼 부작용,파퍼 제조법,
agasg agas
 
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 연예인,파퍼 제조사,파퍼 후기,
agasg agas
 
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 정품구입,파퍼 정품파는곳,파퍼 정품구입처,
agasg agas
 
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 처방받기,파퍼 필름형,파퍼 정품판매,
agasg agas
 
Net neutrality for the layman
Venkatarangan Thirumalai
 
첫날밤은 언제해?『cia88-com』카톡:888J 파퍼구입,파퍼 판매,파퍼 구입,파퍼 파는곳,파퍼 차이,파퍼 강간뉴스,파퍼 냄새,
agasg agas
 
Lololol
israel yanez
 
Ad

Similar to Angular JS, A dive to concepts (20)

PPTX
Angularjs basic part01
Mohd Abdul Baquee
 
PPTX
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
PPTX
Angular JS training institute in Jaipur
HEMANT SAXENA
 
PPTX
Angular Js
Knoldus Inc.
 
PPTX
Angular js introduction
Praveen Gubbala
 
PDF
One Weekend With AngularJS
Yashobanta Bai
 
PDF
AngularJS for Beginners
Edureka!
 
PDF
Getting Started With AngularJS
Edureka!
 
PPTX
Introduction to Angularjs
Manish Shekhawat
 
PDF
Introduction to Angularjs : kishan kumar
Appfinz Technologies
 
PDF
Getting Started with AngularJS
Edureka!
 
PDF
Introduction to AngularJS
Jussi Pohjolainen
 
PDF
AngularJS By Vipin
Vipin Mundayad
 
PPTX
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
PDF
AngularJS
Hiten Pratap Singh
 
PPTX
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
PPTX
Angular js
vu van quyet
 
PPT
Getting started with angular js
Maurice De Beijer [MVP]
 
Angularjs basic part01
Mohd Abdul Baquee
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
Angular JS training institute in Jaipur
HEMANT SAXENA
 
Angular Js
Knoldus Inc.
 
Angular js introduction
Praveen Gubbala
 
One Weekend With AngularJS
Yashobanta Bai
 
AngularJS for Beginners
Edureka!
 
Getting Started With AngularJS
Edureka!
 
Introduction to Angularjs
Manish Shekhawat
 
Introduction to Angularjs : kishan kumar
Appfinz Technologies
 
Getting Started with AngularJS
Edureka!
 
Introduction to AngularJS
Jussi Pohjolainen
 
AngularJS By Vipin
Vipin Mundayad
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
ME vs WEB - AngularJS Fundamentals
Aviran Cohen
 
Angular js
vu van quyet
 
Getting started with angular js
Maurice De Beijer [MVP]
 
Ad

More from Abhishek Sur (20)

PPTX
Azure servicefabric
Abhishek Sur
 
PPT
Building a bot with an intent
Abhishek Sur
 
PPTX
Code review
Abhishek Sur
 
PPTX
C# 7.0 Hacks and Features
Abhishek Sur
 
PPTX
Stream Analytics Service in Azure
Abhishek Sur
 
PPTX
Designing azure compute and storage infrastructure
Abhishek Sur
 
PPTX
Working with Azure Resource Manager Templates
Abhishek Sur
 
PPTX
F12 debugging in Ms edge
Abhishek Sur
 
PPTX
Mobile Services for Windows Azure
Abhishek Sur
 
PPTX
Service bus to build Bridges
Abhishek Sur
 
PPTX
Windows azure pack overview
Abhishek Sur
 
PPTX
AMicrosoft azure hyper v recovery manager overview
Abhishek Sur
 
PPTX
Di api di server b1 ws
Abhishek Sur
 
PPTX
Integrating cortana with wp8 app
Abhishek Sur
 
PPTX
Asp.net performance
Abhishek Sur
 
PPTX
Introduction to XAML and its features
Abhishek Sur
 
PPTX
SQL Server2012 Enhancements
Abhishek Sur
 
PPTX
Dev days Visual Studio 2012 Enhancements
Abhishek Sur
 
PPTX
Hidden Facts of .NET Language Gems
Abhishek Sur
 
PPTX
ASP.NET 4.5 webforms
Abhishek Sur
 
Azure servicefabric
Abhishek Sur
 
Building a bot with an intent
Abhishek Sur
 
Code review
Abhishek Sur
 
C# 7.0 Hacks and Features
Abhishek Sur
 
Stream Analytics Service in Azure
Abhishek Sur
 
Designing azure compute and storage infrastructure
Abhishek Sur
 
Working with Azure Resource Manager Templates
Abhishek Sur
 
F12 debugging in Ms edge
Abhishek Sur
 
Mobile Services for Windows Azure
Abhishek Sur
 
Service bus to build Bridges
Abhishek Sur
 
Windows azure pack overview
Abhishek Sur
 
AMicrosoft azure hyper v recovery manager overview
Abhishek Sur
 
Di api di server b1 ws
Abhishek Sur
 
Integrating cortana with wp8 app
Abhishek Sur
 
Asp.net performance
Abhishek Sur
 
Introduction to XAML and its features
Abhishek Sur
 
SQL Server2012 Enhancements
Abhishek Sur
 
Dev days Visual Studio 2012 Enhancements
Abhishek Sur
 
Hidden Facts of .NET Language Gems
Abhishek Sur
 
ASP.NET 4.5 webforms
Abhishek Sur
 

Recently uploaded (20)

PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
UiPath DevConnect 2025: Agentic Automation Community User Group Meeting
DianaGray10
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
NASA A Researcher’s Guide to International Space Station : Physical Sciences ...
Dr. PANKAJ DHUSSA
 

Angular JS, A dive to concepts

  • 1. Working with Angular JS, A dive to SPA! ~Abhishek Sur
  • 2. Agenda • Misunderstandings • What is angular? • SPAs • Why angular? • Features • MVC/MVVM • Directives, filters, expression • Some cool Demo
  • 3. Another JS Lib Lots of new learning Difficult to learn Useful for web only Used for styling purpose
  • 4. 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).
  • 5. What is ANGULAR JS? (contd…) • 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. • “ANGULARJS is what HTML could have been if it had been designed for web application development.” • AngularJS extends HTML with new attributes.
  • 6. Single Page Application (SPA) SPA Demo http://www.myspa.com View View View View
  • 7. The Challenge with SPAs DOM Manipulation History Routing Module Loading Data Binding Object Modeling Ajax/Promises Caching View Loading
  • 9. 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
  • 10. Key Features of ANGULARJS ngularJS is a full-featured SPA framework Data Binding MVC Routing Templates ViewModel Views Controllers Dependency Injection Directives Testing Controllers jqLite Validation FactoriesHistory
  • 11. 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
  • 12. MVVM: Model View ViewModel View ViewModelModel UI Presentation LogicBusiness Logic and Data • User actions, commands • Data binding • Notifications • Data Access • Update ViewModel about change
  • 13. What are Directives? • 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>
  • 14. What are Directives? (contd..) <!DOCTYPE html> <html ng-app> <head> <title></title> </head> <body> <div class="container"> Name: <input type="text" ng-model="name" /> {{ name }} </div> <script src="Scripts/angular.js"></script> </body> </html> Directive Directive Data Binding Expression
  • 15. Iterating with ng-repeat Directive <html data-ng-app=""> ... <div class="container" data-ng-init="names=['Dave','Napur','Heedy','Shriva']"> <h3>Looping with the ng-repeat Directive</h3> <ul> <li data-ng-repeat="name in names">{{ name }}</li> </ul> </div> ... </html> Iterate through names
  • 16. 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
  • 17. Using Filters <ul> <li data-ng-repeat="cust in customers | orderBy:'name'"> {{ cust.name | uppercase }} </li> </ul> Order customers by name property <input type="text" data-ng-model="nameText" /> <ul> <li data-ng-repeat="cust in customers | filter:nameText | orderBy:'name'"> {{ cust.name }} - {{ cust.city }}</li> </ul> Filter customers by model value
  • 18. Expression Expressions are JavaScript-like code snippets that are usually placed in bindings such as {{ expression }} <body> 1+2={{1+2}} </body>
  • 19. Demo
  • 20. Why should we use Angular JS? • Bootstrap features • Directives for animation & effects for interactive UI • SPA : modern way to represent WEB APP • Compatible with mobile app development
  • 21. Why Developer should use Angular JS? • It is developed by google. • RESTful actions (Using one line of JS you can quickly communicate with server) • Dependency Injection (DI) is a software design pattern that deals with how components get hold of their dependencies. • Provides several options for testing (TDD) • Flexibility with filters • Good documentation & resources.
  • 22. Some Statistics! o Angular JS is 3 times faster than any external JS available till now ~Google.
  • 23. More Statistics! (Interesting One) • GITHUB Stats: • Stars: o if you star a repository, you basically want to show your appreciation as well as keep track of repositories that you find interesting without it spamming your timeline. o In top 3 of github stars project list, only bootstrap & node js is ahead of it. o Check stars stats: o https://github.com/search?utf8=%E2%9C%93&q=stars%3A%3E30000&type=Repositories&ref=searchresult s • fork: o In software engineering, a project fork happens when developers take a legal copy of source code from one software package and start independent development on it, creating a distinct piece of software. o In top 7 of github fork project list. o Check fork stats: o https://github.com/search?utf8=%E2%9C%93&q=forks%3A%3E10000&type=Repositories&ref=searchresult s
  • 24. 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
  • 26. Abhishek Sur Email : [email protected] Twitter: @abhi2434 Facebook : /abhi2434

Editor's Notes

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