SlideShare a Scribd company logo
AngularJS in 
60ish Minutes 
Dan 
Wahlin
Dan Wahlin 
Blog 
h8p://weblogs.asp.net/dwahlin 
Twi8er 
@DanWahlin
Agenda 
• AngularJS 
Features 
• Ge4ng 
Started 
• Direc7ves, 
Filters 
and 
Data 
Binding 
• Modules 
and 
Controllers 
• Routes 
and 
Factories
Single Page ApplicaDons 
SPAs allow different views to be loaded into a shell page 
SPA Demo 
http://www.myspa.com 
<div> 
</div>
Single Page ApplicaDon Views 
Views 
can 
be 
replaced 
with 
other 
views 
SPA Demo 
http://www.myspa.com 
<div> 
V 
i 
e 
w 
1 
</div>
Single Page ApplicaDon History 
SPAs 
maintain 
a 
history 
of 
views 
that 
have 
been 
displayed 
SPA Demo 
http://www.myspa.com 
<div> 
V 
i 
e 
w 
2 
</div>
The Challenge with SPAs 
• SPAs 
rely 
on 
many 
different 
technologies: 
• DOM 
manipula7on 
• History 
• Rou7ng 
• Ajax 
• Data 
Binding 
• More…
Agenda 
• AngularJS 
Features 
• Ge#ng 
Started 
• Direc7ves, 
Filters 
and 
Data 
Binding 
• Modules 
and 
Controllers 
• Routes 
and 
Factories
Data Binding MVC Routing 
Templates 
Testing 
History Factories 
ngularJS is a full-featured 
SPA framework 
ViewModel Views 
Services Dependency Injection 
Directives 
Controllers 
jqLite 
Validation
Key Players in AngularJS 
Module 
Routes 
UI 
Logic/Data 
View $scope 
Controller 
Directives Factory 
Filters Service
What is Scope? 
View $scope Controller 
$scope is the "glue" (ViewModel) 
between a controller and a view
The Big Picture 
Module 
Config 
Routes 
View $scope 
Controller 
Directives *Factory
Agenda 
• AngularJS 
Features 
• Ge4ng 
Started 
• Direc/ves, 
Filters 
and 
Data 
Binding 
• Modules 
and 
Controllers 
• Routes 
and 
Factories
<!DOCTYPE 
html> 
<html 
ng-­‐app> 
<head> 
<title></title> 
</head> 
<body> 
<div 
class="container"> 
Name: 
<input 
type="text" 
ng-­‐model="name" 
/> 
{{ 
name 
}} 
</div> 
<script 
src="js/angular.js"></script> 
</body> 
</html> 
Directive 
Directive 
Data Binding 
Expression 
Using Directives
<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 
Using Filters
Agenda 
• AngularJS 
Features 
• Ge4ng 
Started 
• Direc7ves, 
Filters 
and 
Data 
Binding 
• Modules 
and 
Controllers 
• Routes 
and 
Factories
Modules are Containers 
<html 
ng-­‐app="moduleName"> 
Filter Controller 
Directive Factory 
Routes 
Module 
Config 
Service 
Provider 
Value
Creating a Module 
What's the 
Array for? 
var 
demoApp 
= 
angular.module('demoApp', 
[]); 
var 
demoApp 
= 
angular.module('demoApp', 
['helperModule']); 
Module that demoApp 
depends on
Creating a Controller in a Module 
var 
demoApp 
= 
angular.module('demoApp', 
[]); 
demoApp.controller('SimpleController', 
function 
($scope) 
{ 
$scope.customers 
= 
[ 
{ 
name: 
'Dave 
Jones', 
city: 
'Phoenix' 
}, 
{ 
name: 
'Jamie 
Riley', 
city: 
'Atlanta' 
}, 
{ 
name: 
'Heedy 
Wahlin', 
city: 
'Chandler' 
}, 
{ 
name: 
'Thomas 
Winter', 
city: 
'Seattle' 
} 
]; 
}); 
Define a Module 
Define a Controller
Agenda 
• AngularJS 
Features 
• Ge4ng 
Started 
• Direc7ves, 
Filters 
and 
Data 
Binding 
• Modules 
and 
Controllers 
• Routes 
and 
Factories
The Role of Routes 
SPA Demo 
http://www.myspa.com 
/view2 
View1 View2 
/view3 
/view4 
/view1 
View4 View3
Defining Routes 
var 
demoApp 
= 
angular.module('demoApp', 
['ngRoute']); 
demoApp.config(function 
($routeProvider) 
{ 
$routeProvider 
.when('/', 
{ 
controller: 
'CustomersController', 
templateUrl:'customers.html' 
}) 
.when('/orders', 
{ 
controller: 
'OrdersController', 
templateUrl:'orders.html' 
}) 
.otherwise({ 
redirectTo: 
'/' 
}); 
}); 
Define Module 
Routes
Where do Views Go in a Page? 
Dynamically loaded views are injected into the shell page as a 
module loads: 
SPA Demo 
http://www.myspa.com 
<div 
ng-­‐view></div> 
OR 
<ng-­‐view></ng-­‐view> 
View1
The Role of Factories 
var 
demoApp 
= 
angular.module('demoApp', 
[]) 
.factory('simpleFactory', 
function 
($http) 
{ 
var 
factory 
= 
{}; 
factory.getCustomers 
= 
function 
() 
{ 
return 
$http.get(…); 
}; 
return 
factory; 
}) 
.controller('SimpleController', 
function 
($scope, 
simpleFactory) 
{ 
= 
simpleFactory.getCustomers().success(…); 
}); 
Factory Injected
The Big Picture 
Module 
Config 
Routes 
View $scope 
Controller 
Directives *Factory
hNps://github.com/DanWahlin/CustomerManagerStandard
Find more ngularJS content at: 
Blog 
h8p://weblogs.asp.net/dwahlin 
Twi8er 
@DanWahlin
More 
details 
at: 
hNp://7nyurl.com/AngularJSJumpStart
AngularJS in 60ish Minutes - Dan Wahlin | FalafelCON 2014

More Related Content

What's hot (20)

Short intro to JQuery and Modernizr
Short intro to JQuery and ModernizrShort intro to JQuery and Modernizr
Short intro to JQuery and Modernizr
Jussi Pohjolainen
 
BackboneJS Training - Giving Backbone to your applications
BackboneJS Training - Giving Backbone to your applicationsBackboneJS Training - Giving Backbone to your applications
BackboneJS Training - Giving Backbone to your applications
Joseph Khan
 
How routing works in angular js
How routing works in angular jsHow routing works in angular js
How routing works in angular js
codeandyou forums
 
JQuery
JQueryJQuery
JQuery
Jussi Pohjolainen
 
Architecture, Auth, and Routing with uiRouter
Architecture, Auth, and Routing with uiRouterArchitecture, Auth, and Routing with uiRouter
Architecture, Auth, and Routing with uiRouter
Christopher Caplinger
 
Angular JS Routing
Angular JS RoutingAngular JS Routing
Angular JS Routing
kennystoltz
 
UI-Router
UI-RouterUI-Router
UI-Router
Loc Nguyen
 
BackboneJs
BackboneJsBackboneJs
BackboneJs
Jineesh John
 
Dive into AngularJS Routing
Dive into AngularJS RoutingDive into AngularJS Routing
Dive into AngularJS Routing
Egor Miasnikov
 
Valentine with AngularJS
Valentine with AngularJSValentine with AngularJS
Valentine with AngularJS
Vidyasagar Machupalli
 
The AngularJS way
The AngularJS wayThe AngularJS way
The AngularJS way
Boyan Mihaylov
 
ui-router and $state
ui-router and $stateui-router and $state
ui-router and $state
garbles
 
Backbone js in action
Backbone js in actionBackbone js in action
Backbone js in action
Usha Guduri
 
Optimizing Angular Performance in Enterprise Single Page Apps
Optimizing Angular Performance in Enterprise Single Page AppsOptimizing Angular Performance in Enterprise Single Page Apps
Optimizing Angular Performance in Enterprise Single Page Apps
Morgan Stone
 
Dundee University HackU 2013 - Mojito
Dundee University HackU 2013 - MojitoDundee University HackU 2013 - Mojito
Dundee University HackU 2013 - Mojito
smartads
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
Wei Ru
 
Backbonejs for beginners
Backbonejs for beginnersBackbonejs for beginners
Backbonejs for beginners
Divakar Gu
 
Backbone
BackboneBackbone
Backbone
Glenn De Backer
 
Codigo seta
Codigo setaCodigo seta
Codigo seta
Mcdimenordoabc Sanches
 
The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014
Matt Raible
 
Short intro to JQuery and Modernizr
Short intro to JQuery and ModernizrShort intro to JQuery and Modernizr
Short intro to JQuery and Modernizr
Jussi Pohjolainen
 
BackboneJS Training - Giving Backbone to your applications
BackboneJS Training - Giving Backbone to your applicationsBackboneJS Training - Giving Backbone to your applications
BackboneJS Training - Giving Backbone to your applications
Joseph Khan
 
How routing works in angular js
How routing works in angular jsHow routing works in angular js
How routing works in angular js
codeandyou forums
 
Architecture, Auth, and Routing with uiRouter
Architecture, Auth, and Routing with uiRouterArchitecture, Auth, and Routing with uiRouter
Architecture, Auth, and Routing with uiRouter
Christopher Caplinger
 
Angular JS Routing
Angular JS RoutingAngular JS Routing
Angular JS Routing
kennystoltz
 
Dive into AngularJS Routing
Dive into AngularJS RoutingDive into AngularJS Routing
Dive into AngularJS Routing
Egor Miasnikov
 
ui-router and $state
ui-router and $stateui-router and $state
ui-router and $state
garbles
 
Backbone js in action
Backbone js in actionBackbone js in action
Backbone js in action
Usha Guduri
 
Optimizing Angular Performance in Enterprise Single Page Apps
Optimizing Angular Performance in Enterprise Single Page AppsOptimizing Angular Performance in Enterprise Single Page Apps
Optimizing Angular Performance in Enterprise Single Page Apps
Morgan Stone
 
Dundee University HackU 2013 - Mojito
Dundee University HackU 2013 - MojitoDundee University HackU 2013 - Mojito
Dundee University HackU 2013 - Mojito
smartads
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
Wei Ru
 
Backbonejs for beginners
Backbonejs for beginnersBackbonejs for beginners
Backbonejs for beginners
Divakar Gu
 
The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014
Matt Raible
 

Viewers also liked (20)

Angular Promises and Advanced Routing
Angular Promises and Advanced RoutingAngular Promises and Advanced Routing
Angular Promises and Advanced Routing
Alexe Bogdan
 
CSS Frameworks
CSS FrameworksCSS Frameworks
CSS Frameworks
Web Directions
 
Css frameworks
Css frameworksCss frameworks
Css frameworks
Dimitar Belchugov
 
CSS Frameworks: Make the Right Choice (EOTW09)
CSS Frameworks: Make the Right Choice (EOTW09)CSS Frameworks: Make the Right Choice (EOTW09)
CSS Frameworks: Make the Right Choice (EOTW09)
Kevin Yank
 
Angular js
Angular jsAngular js
Angular js
Dinusha Nandika
 
Don’t get Bootslapped: How to Avoid Common Pitfalls with CSS Frameworks
Don’t get Bootslapped: How to Avoid Common Pitfalls with CSS FrameworksDon’t get Bootslapped: How to Avoid Common Pitfalls with CSS Frameworks
Don’t get Bootslapped: How to Avoid Common Pitfalls with CSS Frameworks
WebVisions
 
CSS Frameworks
CSS FrameworksCSS Frameworks
CSS Frameworks
Mario Hernandez
 
Get satrted angular js
Get satrted angular jsGet satrted angular js
Get satrted angular js
Alexandre Marreiros
 
Getting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundationGetting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundation
Melanie Archer
 
Managing state in Angular 1.x with Redux
Managing state in Angular 1.x with ReduxManaging state in Angular 1.x with Redux
Managing state in Angular 1.x with Redux
500Tech
 
Angular js
Angular jsAngular js
Angular js
Knoldus Inc.
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Jussi Pohjolainen
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
Bryan Basham
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]
Aaron Gustafson
 
Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJS
M R Rony
 
AngularJS Basics with Example
AngularJS Basics with ExampleAngularJS Basics with Example
AngularJS Basics with Example
Sergey Bolshchikov
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
Reveal.js
Reveal.jsReveal.js
Reveal.js
Hakim El Hattab
 
Js ppt
Js pptJs ppt
Js ppt
Rakhi Thota
 
Javascript
JavascriptJavascript
Javascript
guest03a6e6
 
Angular Promises and Advanced Routing
Angular Promises and Advanced RoutingAngular Promises and Advanced Routing
Angular Promises and Advanced Routing
Alexe Bogdan
 
CSS Frameworks: Make the Right Choice (EOTW09)
CSS Frameworks: Make the Right Choice (EOTW09)CSS Frameworks: Make the Right Choice (EOTW09)
CSS Frameworks: Make the Right Choice (EOTW09)
Kevin Yank
 
Don’t get Bootslapped: How to Avoid Common Pitfalls with CSS Frameworks
Don’t get Bootslapped: How to Avoid Common Pitfalls with CSS FrameworksDon’t get Bootslapped: How to Avoid Common Pitfalls with CSS Frameworks
Don’t get Bootslapped: How to Avoid Common Pitfalls with CSS Frameworks
WebVisions
 
Getting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundationGetting started with CSS frameworks using Zurb foundation
Getting started with CSS frameworks using Zurb foundation
Melanie Archer
 
Managing state in Angular 1.x with Redux
Managing state in Angular 1.x with ReduxManaging state in Angular 1.x with Redux
Managing state in Angular 1.x with Redux
500Tech
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
Bryan Basham
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]
Aaron Gustafson
 
Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJS
M R Rony
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 

Similar to AngularJS in 60ish Minutes - Dan Wahlin | FalafelCON 2014 (20)

Basics of AngularJS
Basics of AngularJSBasics of AngularJS
Basics of AngularJS
Filip Janevski
 
AngularJS
AngularJSAngularJS
AngularJS
Srivatsan Krishnamachari
 
Angular
AngularAngular
Angular
LearningTech
 
Angular
AngularAngular
Angular
LearningTech
 
AngularJS
AngularJSAngularJS
AngularJS
LearningTech
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte I
Visual Engineering
 
Introducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and serverIntroducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and server
Spike Brehm
 
Built in filters
Built in filtersBuilt in filters
Built in filters
Brajesh Yadav
 
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
AngularJs Superheroic JavaScript MVW Framework Services by Miracle StudiosAngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
Learnimtactics
 
Aurelia Meetup Paris
Aurelia Meetup ParisAurelia Meetup Paris
Aurelia Meetup Paris
Ahmed Radjdi
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
Luigi De Russis
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Learning AngularJS  - Complete coverage of AngularJS features and conceptsLearning AngularJS  - Complete coverage of AngularJS features and concepts
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
Building Modern Websites with ASP.NET by Rachel Appel
Building Modern Websites with ASP.NET by Rachel AppelBuilding Modern Websites with ASP.NET by Rachel Appel
Building Modern Websites with ASP.NET by Rachel Appel
.NET Conf UY
 
MEAN - Notes from the field (Full-Stack Development with Javascript)
MEAN - Notes from the field (Full-Stack Development with Javascript)MEAN - Notes from the field (Full-Stack Development with Javascript)
MEAN - Notes from the field (Full-Stack Development with Javascript)
Chris Clarke
 
Tech talk live share extras extension modules feb 13
Tech talk live   share extras extension modules feb 13Tech talk live   share extras extension modules feb 13
Tech talk live share extras extension modules feb 13
Alfresco Software
 
Angular js
Angular jsAngular js
Angular js
vu van quyet
 
Introduction to single page application with angular js
Introduction to single page application with angular jsIntroduction to single page application with angular js
Introduction to single page application with angular js
Mindfire Solutions
 
Introduction to AngularJs
Introduction to AngularJsIntroduction to AngularJs
Introduction to AngularJs
murtazahaveliwala
 
AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014
Ran Wahle
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
murtazahaveliwala
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte I
Visual Engineering
 
Introducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and serverIntroducing Rendr: Run your Backbone.js apps on the client and server
Introducing Rendr: Run your Backbone.js apps on the client and server
Spike Brehm
 
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
AngularJs Superheroic JavaScript MVW Framework Services by Miracle StudiosAngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
Learnimtactics
 
Aurelia Meetup Paris
Aurelia Meetup ParisAurelia Meetup Paris
Aurelia Meetup Paris
Ahmed Radjdi
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
Luigi De Russis
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Learning AngularJS  - Complete coverage of AngularJS features and conceptsLearning AngularJS  - Complete coverage of AngularJS features and concepts
Learning AngularJS - Complete coverage of AngularJS features and concepts
Suresh Patidar
 
Building Modern Websites with ASP.NET by Rachel Appel
Building Modern Websites with ASP.NET by Rachel AppelBuilding Modern Websites with ASP.NET by Rachel Appel
Building Modern Websites with ASP.NET by Rachel Appel
.NET Conf UY
 
MEAN - Notes from the field (Full-Stack Development with Javascript)
MEAN - Notes from the field (Full-Stack Development with Javascript)MEAN - Notes from the field (Full-Stack Development with Javascript)
MEAN - Notes from the field (Full-Stack Development with Javascript)
Chris Clarke
 
Tech talk live share extras extension modules feb 13
Tech talk live   share extras extension modules feb 13Tech talk live   share extras extension modules feb 13
Tech talk live share extras extension modules feb 13
Alfresco Software
 
Introduction to single page application with angular js
Introduction to single page application with angular jsIntroduction to single page application with angular js
Introduction to single page application with angular js
Mindfire Solutions
 
AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014
Ran Wahle
 

More from FalafelSoftware (13)

Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
FalafelSoftware
 
DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014
DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014
DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014
FalafelSoftware
 
Breaking Dependencies To Allow Unit Testing - Steve Smith | FalafelCON 2014
Breaking Dependencies To Allow Unit Testing - Steve Smith | FalafelCON 2014Breaking Dependencies To Allow Unit Testing - Steve Smith | FalafelCON 2014
Breaking Dependencies To Allow Unit Testing - Steve Smith | FalafelCON 2014
FalafelSoftware
 
Solving Mobile Test Automation Challenges with TestComplete - Nick Olivo | Fa...
Solving Mobile Test Automation Challenges with TestComplete - Nick Olivo | Fa...Solving Mobile Test Automation Challenges with TestComplete - Nick Olivo | Fa...
Solving Mobile Test Automation Challenges with TestComplete - Nick Olivo | Fa...
FalafelSoftware
 
iBeacons for Everyone, from iOS to Android - James Montemagno | FalafelCON 2014
iBeacons for Everyone, from iOS to Android - James Montemagno | FalafelCON 2014iBeacons for Everyone, from iOS to Android - James Montemagno | FalafelCON 2014
iBeacons for Everyone, from iOS to Android - James Montemagno | FalafelCON 2014
FalafelSoftware
 
XAML Development with Xamarin - Jesse Liberty | FalafelCON 2014
XAML Development with Xamarin  - Jesse Liberty | FalafelCON 2014XAML Development with Xamarin  - Jesse Liberty | FalafelCON 2014
XAML Development with Xamarin - Jesse Liberty | FalafelCON 2014
FalafelSoftware
 
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
FalafelSoftware
 
AngularJS and Kendo UI - Jesse Liberty | FalafelCON 2014
AngularJS and Kendo UI - Jesse Liberty | FalafelCON 2014AngularJS and Kendo UI - Jesse Liberty | FalafelCON 2014
AngularJS and Kendo UI - Jesse Liberty | FalafelCON 2014
FalafelSoftware
 
Agile Patterns: Estimation - Stephen Forte | FalafelCON 2014
Agile Patterns: Estimation - Stephen Forte | FalafelCON 2014Agile Patterns: Estimation - Stephen Forte | FalafelCON 2014
Agile Patterns: Estimation - Stephen Forte | FalafelCON 2014
FalafelSoftware
 
Mobile ASP.Net Web Forms - Making the impossible possible | FalafelCON 2014
Mobile ASP.Net Web Forms - Making the impossible possible | FalafelCON 2014Mobile ASP.Net Web Forms - Making the impossible possible | FalafelCON 2014
Mobile ASP.Net Web Forms - Making the impossible possible | FalafelCON 2014
FalafelSoftware
 
Introducing ASP.NET vNext – The Future of .NET on the Server | FalafelCON 2014
Introducing ASP.NET vNext – The Future of .NET on the Server | FalafelCON 2014Introducing ASP.NET vNext – The Future of .NET on the Server | FalafelCON 2014
Introducing ASP.NET vNext – The Future of .NET on the Server | FalafelCON 2014
FalafelSoftware
 
Cloud and Azure and Rock and Roll
Cloud and Azure and Rock and RollCloud and Azure and Rock and Roll
Cloud and Azure and Rock and Roll
FalafelSoftware
 
The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014
The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014
The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014
FalafelSoftware
 
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
Building Custom AngularJS Directives - A Step-by-Step Guide - Dan Wahlin | Fa...
FalafelSoftware
 
DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014
DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014
DDD with ASP.NET MVC - Steve Smith | FalafelCON 2014
FalafelSoftware
 
Breaking Dependencies To Allow Unit Testing - Steve Smith | FalafelCON 2014
Breaking Dependencies To Allow Unit Testing - Steve Smith | FalafelCON 2014Breaking Dependencies To Allow Unit Testing - Steve Smith | FalafelCON 2014
Breaking Dependencies To Allow Unit Testing - Steve Smith | FalafelCON 2014
FalafelSoftware
 
Solving Mobile Test Automation Challenges with TestComplete - Nick Olivo | Fa...
Solving Mobile Test Automation Challenges with TestComplete - Nick Olivo | Fa...Solving Mobile Test Automation Challenges with TestComplete - Nick Olivo | Fa...
Solving Mobile Test Automation Challenges with TestComplete - Nick Olivo | Fa...
FalafelSoftware
 
iBeacons for Everyone, from iOS to Android - James Montemagno | FalafelCON 2014
iBeacons for Everyone, from iOS to Android - James Montemagno | FalafelCON 2014iBeacons for Everyone, from iOS to Android - James Montemagno | FalafelCON 2014
iBeacons for Everyone, from iOS to Android - James Montemagno | FalafelCON 2014
FalafelSoftware
 
XAML Development with Xamarin - Jesse Liberty | FalafelCON 2014
XAML Development with Xamarin  - Jesse Liberty | FalafelCON 2014XAML Development with Xamarin  - Jesse Liberty | FalafelCON 2014
XAML Development with Xamarin - Jesse Liberty | FalafelCON 2014
FalafelSoftware
 
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
FalafelSoftware
 
AngularJS and Kendo UI - Jesse Liberty | FalafelCON 2014
AngularJS and Kendo UI - Jesse Liberty | FalafelCON 2014AngularJS and Kendo UI - Jesse Liberty | FalafelCON 2014
AngularJS and Kendo UI - Jesse Liberty | FalafelCON 2014
FalafelSoftware
 
Agile Patterns: Estimation - Stephen Forte | FalafelCON 2014
Agile Patterns: Estimation - Stephen Forte | FalafelCON 2014Agile Patterns: Estimation - Stephen Forte | FalafelCON 2014
Agile Patterns: Estimation - Stephen Forte | FalafelCON 2014
FalafelSoftware
 
Mobile ASP.Net Web Forms - Making the impossible possible | FalafelCON 2014
Mobile ASP.Net Web Forms - Making the impossible possible | FalafelCON 2014Mobile ASP.Net Web Forms - Making the impossible possible | FalafelCON 2014
Mobile ASP.Net Web Forms - Making the impossible possible | FalafelCON 2014
FalafelSoftware
 
Introducing ASP.NET vNext – The Future of .NET on the Server | FalafelCON 2014
Introducing ASP.NET vNext – The Future of .NET on the Server | FalafelCON 2014Introducing ASP.NET vNext – The Future of .NET on the Server | FalafelCON 2014
Introducing ASP.NET vNext – The Future of .NET on the Server | FalafelCON 2014
FalafelSoftware
 
Cloud and Azure and Rock and Roll
Cloud and Azure and Rock and RollCloud and Azure and Rock and Roll
Cloud and Azure and Rock and Roll
FalafelSoftware
 
The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014
The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014
The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014
FalafelSoftware
 

Recently uploaded (20)

Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
Societal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainabilitySocietal challenges of AI: biases, multilinguism and sustainability
Societal challenges of AI: biases, multilinguism and sustainability
Jordi Cabot
 
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)
Andre Hora
 
Expand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchangeExpand your AI adoption with AgentExchange
Expand your AI adoption with AgentExchange
Fexle Services Pvt. Ltd.
 
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...
Ranjan Baisak
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
What Do Contribution Guidelines Say About Software Testing? (MSR 2025)
Andre Hora
 
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
TestMigrationsInPy: A Dataset of Test Migrations from Unittest to Pytest (MSR...
Andre Hora
 
Automation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath CertificateAutomation Techniques in RPA - UiPath Certificate
Automation Techniques in RPA - UiPath Certificate
VICTOR MAESTRE RAMIREZ
 
EASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License CodeEASEUS Partition Master Crack + License Code
EASEUS Partition Master Crack + License Code
aneelaramzan63
 
Adobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest VersionAdobe Illustrator Crack FREE Download 2025 Latest Version
Adobe Illustrator Crack FREE Download 2025 Latest Version
kashifyounis067
 
Revolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptxRevolutionizing Residential Wi-Fi PPT.pptx
Revolutionizing Residential Wi-Fi PPT.pptx
nidhisingh691197
 
The Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdfThe Significance of Hardware in Information Systems.pdf
The Significance of Hardware in Information Systems.pdf
drewplanas10
 
Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025Avast Premium Security Crack FREE Latest Version 2025
Avast Premium Security Crack FREE Latest Version 2025
mu394968
 
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...Exploring Code Comprehension  in Scientific Programming:  Preliminary Insight...
Exploring Code Comprehension in Scientific Programming: Preliminary Insight...
University of Hawai‘i at Mānoa
 
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Salesforce Data Cloud- Hyperscale data platform, built for Salesforce.
Dele Amefo
 
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDesigning AI-Powered APIs on Azure: Best Practices& Considerations
Designing AI-Powered APIs on Azure: Best Practices& Considerations
Dinusha Kumarasiri
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
How to Batch Export Lotus Notes NSF Emails to Outlook PST Easily?
steaveroggers
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 

AngularJS in 60ish Minutes - Dan Wahlin | FalafelCON 2014

  • 1. AngularJS in 60ish Minutes Dan Wahlin
  • 2. Dan Wahlin Blog h8p://weblogs.asp.net/dwahlin Twi8er @DanWahlin
  • 3. Agenda • AngularJS Features • Ge4ng Started • Direc7ves, Filters and Data Binding • Modules and Controllers • Routes and Factories
  • 4. Single Page ApplicaDons SPAs allow different views to be loaded into a shell page SPA Demo http://www.myspa.com <div> </div>
  • 5. Single Page ApplicaDon Views Views can be replaced with other views SPA Demo http://www.myspa.com <div> V i e w 1 </div>
  • 6. Single Page ApplicaDon History SPAs maintain a history of views that have been displayed SPA Demo http://www.myspa.com <div> V i e w 2 </div>
  • 7. The Challenge with SPAs • SPAs rely on many different technologies: • DOM manipula7on • History • Rou7ng • Ajax • Data Binding • More…
  • 8. Agenda • AngularJS Features • Ge#ng Started • Direc7ves, Filters and Data Binding • Modules and Controllers • Routes and Factories
  • 9. Data Binding MVC Routing Templates Testing History Factories ngularJS is a full-featured SPA framework ViewModel Views Services Dependency Injection Directives Controllers jqLite Validation
  • 10. Key Players in AngularJS Module Routes UI Logic/Data View $scope Controller Directives Factory Filters Service
  • 11. What is Scope? View $scope Controller $scope is the "glue" (ViewModel) between a controller and a view
  • 12. The Big Picture Module Config Routes View $scope Controller Directives *Factory
  • 13. Agenda • AngularJS Features • Ge4ng Started • Direc/ves, Filters and Data Binding • Modules and Controllers • Routes and Factories
  • 14. <!DOCTYPE html> <html ng-­‐app> <head> <title></title> </head> <body> <div class="container"> Name: <input type="text" ng-­‐model="name" /> {{ name }} </div> <script src="js/angular.js"></script> </body> </html> Directive Directive Data Binding Expression Using Directives
  • 15. <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 Using Filters
  • 16. Agenda • AngularJS Features • Ge4ng Started • Direc7ves, Filters and Data Binding • Modules and Controllers • Routes and Factories
  • 17. Modules are Containers <html ng-­‐app="moduleName"> Filter Controller Directive Factory Routes Module Config Service Provider Value
  • 18. Creating a Module What's the Array for? var demoApp = angular.module('demoApp', []); var demoApp = angular.module('demoApp', ['helperModule']); Module that demoApp depends on
  • 19. Creating a Controller in a Module var demoApp = angular.module('demoApp', []); demoApp.controller('SimpleController', function ($scope) { $scope.customers = [ { name: 'Dave Jones', city: 'Phoenix' }, { name: 'Jamie Riley', city: 'Atlanta' }, { name: 'Heedy Wahlin', city: 'Chandler' }, { name: 'Thomas Winter', city: 'Seattle' } ]; }); Define a Module Define a Controller
  • 20. Agenda • AngularJS Features • Ge4ng Started • Direc7ves, Filters and Data Binding • Modules and Controllers • Routes and Factories
  • 21. The Role of Routes SPA Demo http://www.myspa.com /view2 View1 View2 /view3 /view4 /view1 View4 View3
  • 22. Defining Routes var demoApp = angular.module('demoApp', ['ngRoute']); demoApp.config(function ($routeProvider) { $routeProvider .when('/', { controller: 'CustomersController', templateUrl:'customers.html' }) .when('/orders', { controller: 'OrdersController', templateUrl:'orders.html' }) .otherwise({ redirectTo: '/' }); }); Define Module Routes
  • 23. Where do Views Go in a Page? Dynamically loaded views are injected into the shell page as a module loads: SPA Demo http://www.myspa.com <div ng-­‐view></div> OR <ng-­‐view></ng-­‐view> View1
  • 24. The Role of Factories var demoApp = angular.module('demoApp', []) .factory('simpleFactory', function ($http) { var factory = {}; factory.getCustomers = function () { return $http.get(…); }; return factory; }) .controller('SimpleController', function ($scope, simpleFactory) { = simpleFactory.getCustomers().success(…); }); Factory Injected
  • 25. The Big Picture Module Config Routes View $scope Controller Directives *Factory
  • 27. Find more ngularJS content at: Blog h8p://weblogs.asp.net/dwahlin Twi8er @DanWahlin
  • 28. More details at: hNp://7nyurl.com/AngularJSJumpStart