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

PPTX
Introduction to Angular JS
Santhosh Kumar Srinivasan
 
PPTX
Front end development with Angular JS
Bipin
 
PPTX
Angular JS - Introduction
Sagar Acharya
 
PDF
Angular JS tutorial
cncwebworld
 
PPTX
Getting Started with Angular JS
Akshay Mathur
 
PPTX
Step by Step - AngularJS
Infragistics
 
PPTX
Angular js presentation at Datacom
David Xi Peng Yang
 
PPTX
Introduction to AngularJS
David Parsons
 
Introduction to Angular JS
Santhosh Kumar Srinivasan
 
Front end development with Angular JS
Bipin
 
Angular JS - Introduction
Sagar Acharya
 
Angular JS tutorial
cncwebworld
 
Getting Started with Angular JS
Akshay Mathur
 
Step by Step - AngularJS
Infragistics
 
Angular js presentation at Datacom
David Xi Peng Yang
 
Introduction to AngularJS
David Parsons
 

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
AngularJS
Maurice De Beijer [MVP]
 
PPTX
Angular js
Manav Prasad
 
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 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
 
Ad

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
Valentine with Angular js - Introduction
Senthil Kumar
 
PPTX
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
PPTX
Angular patterns
Premkumar M
 
PDF
Integrating AngularJS into the Campus CMS
Tom Borger
 
PDF
AngularJS Basics
Nikita Shounewich
 
PPT
Angularjs for kolkata drupal meetup
Goutam Dey
 
PPTX
Angular js workshop
Rolands Krumbergs
 
PPTX
Angularjs
Sabin Tamrakar
 
PDF
AngularJS in Production (CTO Forum)
Alex Ross
 
PPTX
AngularJS Beginners Workshop
Sathish VJ
 
PDF
End to-End SPA Development Using ASP.NET and AngularJS
Gil Fink
 
PPTX
SPA05-Intro-to-Angular Introduction and its types
jexidet287
 
PPTX
An Introduction to ANGULARJS Advanced Course
idhafacom
 
PPTX
Javascript frameworks
RajkumarJangid7
 
KEY
Single Page Applications - Desert Code Camp 2012
Adam Mokan
 
PPTX
Module2
HoĂ ng LĂŞ
 
PPTX
Anjular js
Naga Dinesh
 
PPTX
What are the key distinctions between Angular and AngularJS?
Albiorix Technology
 
PPTX
Angular js for enteprise application
vu van quyet
 
PPTX
AngularJS
Srivatsan Krishnamachari
 
Valentine with Angular js - Introduction
Senthil Kumar
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
Angular patterns
Premkumar M
 
Integrating AngularJS into the Campus CMS
Tom Borger
 
AngularJS Basics
Nikita Shounewich
 
Angularjs for kolkata drupal meetup
Goutam Dey
 
Angular js workshop
Rolands Krumbergs
 
Angularjs
Sabin Tamrakar
 
AngularJS in Production (CTO Forum)
Alex Ross
 
AngularJS Beginners Workshop
Sathish VJ
 
End to-End SPA Development Using ASP.NET and AngularJS
Gil Fink
 
SPA05-Intro-to-Angular Introduction and its types
jexidet287
 
An Introduction to ANGULARJS Advanced Course
idhafacom
 
Javascript frameworks
RajkumarJangid7
 
Single Page Applications - Desert Code Camp 2012
Adam Mokan
 
Module2
HoĂ ng LĂŞ
 
Anjular js
Naga Dinesh
 
What are the key distinctions between Angular and AngularJS?
Albiorix Technology
 
Angular js for enteprise application
vu van quyet
 

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
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PDF
Best ERP System for Manufacturing in India | Elite Mindz
Elite Mindz
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
PDF
Software Development Company | KodekX
KodekX
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PPT
L2 Rules of Netiquette in Empowerment technology
Archibal2
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
Best ERP System for Manufacturing in India | Elite Mindz
Elite Mindz
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Why Your AI & Cybersecurity Hiring Still Misses the Mark in 2025
Virtual Employee Pvt. Ltd.
 
Software Development Company | KodekX
KodekX
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
L2 Rules of Netiquette in Empowerment technology
Archibal2
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 

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.