SlideShare a Scribd company logo
Building an End-to-End
AngularJS Application
Dan Wahlin
Building an End-to-End AngularJS Application
Building an End-to-End AngularJS Application






The Customer Manager App
Building an End-to-End AngularJS Application
http://tinyurl.com/CustomerMgr
Application Technologies
Node.js
Express
MongoDB
ASP.NET
Web API
SQL Server
/api/dataservice/
ngAnimate Bootstrap
AngularJS
ngRoute UI Bootstrap
Optional
Breeze jQuery GreenSock
Application and Code
Structure
Building an End-to-End AngularJS Application








Building an End-to-End AngularJS Application
Building an End-to-End AngularJS Application
angular.module('customersApp').controller('MyController',
['$scope', function ($scope) {
$scope.orderby = 'product';
$scope.reverse = false;
$scope.ordersTotal = 0.00;
$scope.setOrder = function (orderby) { … };
}]);
(function() {
var myController = function ($scope) {
$scope.orderby = 'product';
$scope.reverse = false;
$scope.ordersTotal = 0.00;
$scope.setOrder = function (orderby) { … };
init();
function init() { … }
};
myController.$inject = ['$scope'];
angular.module('customersApp'.controller('MyController',
myController);
}());
Focus on your code
Handle minification
Hook function into
AngularjS
Creating Factories and
Services
customersService modalService
customersBreezeService
Controllers/Directives
Show Modal DialogWork with Data
authService
(function () {
var customersService = function ($http, $q) {
var serviceBase = '/api/dataservice/',
customersFactory = {};
customersFactory.getCustomers = function (pageIndex,
pageSize) {
return getPagedResource('customers', pageIndex,
pageSize);
};
return customersFactory;
};
customersService.$inject = ['$http', '$q'];
angular.module('customersService')
.factory('customersService' customersService);
}());
Uses $http to call
RESTful service
(function () {
var authFactory = function ($http, $q, $rootScope) {
var serviceBase = '/api/dataservice/',
factory = {
loginPath: '/login',
user: { isAuthenticated: false }
};
factory.login = function (email, password) { };
factory.logout = function () { };
return factory;
};
authFactory.$inject = ['$http', '$q', '$rootScope'];
angular.module('customersApp')
.factory('authService', authFactory);
}());
(function () {
var modalService = function ($modal) {
this.showModal = function (customModalDefaults,
customModalOptions) { … };
this.show = function (customModalDefaults,
customModalOptions) {
return $modal.open(tempModalDefaults).result;
};
};
modalService.$inject = ['$modal'];
angular.module('customersApp'.service('modalService',
modalService]);
}());
Provider from UI Bootstrap
Directives and Filters
Directives
wcOverlay
wcUnique
Filters
nameCityStateFilter
nameProductFilter





var wcDirectivesApp = angular.module('wc.directives', []);
//Empty factory to hook into $httpProvider.interceptors
//Directive will hookup request, response, and responseError
interceptors
wcDirectivesApp.factory('httpInterceptor', function () {
return {};
});
//Hook httpInterceptor factory into the $httpProvider interceptors
so that we can monitor XHR calls
wcDirectivesApp.config(['$httpProvider', function ($httpProvider) {
$httpProvider.interceptors.push('httpInterceptor');
}]);
function wireUpHttpInterceptor() {
httpInterceptor.request = function (config) {
processRequest();
return config || $q.when(config);
};
httpInterceptor.response = function (response) {
processResponse();
return response || $q.when(response);
};
httpInterceptor.responseError = function (rejection) {
processResponse();
return rejection || $q.when(rejection);
};
}
httpInterceptor injected
into Directive



if (currentValue === element.val()) {
ngModel.$setValidity('unique', unique);
}






<div data-ng-repeat="customer in customers |
nameProductFilter:searchText | orderBy:'lastName'">
…
</div>

function filterCustomers(filterText) {
$scope.filteredCustomers =
$filter("nameCityStateFilter")($scope.customers, filterText);
$scope.filteredCount = $scope.filteredCustomers.length;
}
Controllers and Views













<div data-ng-view="" id="ng-view"
class="slide-animation"></div>

<div data-wc-overlay="" data-wc-overlay-delay="300">
<img src="/Content/images/spinner.gif"/>
&nbsp;&nbsp;Loading
</div>
customersApp.config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/customers', {
controller: 'CustomersController',
templateUrl: '/app/views/customers/customers.html'
})
.when('/customerorders/:customerID', {
controller: 'CustomerOrdersController',
templateUrl: '/app/views/customers/customerOrders.html'
})
.when('/customeredit/:customerID', {
controller: 'CustomerEditController',
templateUrl: '/app/views/customers/customerEdit.html'
})
.when('/orders', {
controller: 'OrdersController',
templateUrl: '/app/views/orders/orders.html'
})
.otherwise({ redirectTo: '/customers' });
}]);














http://weblogs.asp.net/dwahlin
Building an End-to-End AngularJS Application
Building an End-to-End AngularJS Application

More Related Content

What's hot (20)

PDF
Angular JS blog tutorial
Claude Tech
 
PPTX
Why angular js Framework
Sakthi Bro
 
PPTX
Angular js architecture (v1.4.8)
Gabi Costel Lapusneanu
 
PDF
AngularJS Framework
Barcamp Saigon
 
PPTX
AngularJS $Provide Service
Eyal Vardi
 
PPTX
AngularJS Architecture
Eyal Vardi
 
DOCX
Built in filters
Brajesh Yadav
 
PPTX
AngularJs
syam kumar kk
 
PDF
Advanced Tips & Tricks for using Angular JS
Simon Guest
 
PPTX
Upgrading from Angular 1.x to Angular 2.x
Eyal Vardi
 
PPTX
Building AngularJS Custom Directives
Dan Wahlin
 
PPTX
UI-Router
Loc Nguyen
 
PPTX
Angular 2.0 Routing and Navigation
Eyal Vardi
 
PDF
Patterns Are Good For Managers
AgileThought
 
PPTX
Modules and injector
Eyal Vardi
 
PDF
Intro to Angular.JS Directives
Christian Lilley
 
PDF
Angular Promises and Advanced Routing
Alexe Bogdan
 
DOCX
Filters in AngularJS
Brajesh Yadav
 
PPTX
AngularJS Compile Process
Eyal Vardi
 
PPTX
Dart and AngularDart
Loc Nguyen
 
Angular JS blog tutorial
Claude Tech
 
Why angular js Framework
Sakthi Bro
 
Angular js architecture (v1.4.8)
Gabi Costel Lapusneanu
 
AngularJS Framework
Barcamp Saigon
 
AngularJS $Provide Service
Eyal Vardi
 
AngularJS Architecture
Eyal Vardi
 
Built in filters
Brajesh Yadav
 
AngularJs
syam kumar kk
 
Advanced Tips & Tricks for using Angular JS
Simon Guest
 
Upgrading from Angular 1.x to Angular 2.x
Eyal Vardi
 
Building AngularJS Custom Directives
Dan Wahlin
 
UI-Router
Loc Nguyen
 
Angular 2.0 Routing and Navigation
Eyal Vardi
 
Patterns Are Good For Managers
AgileThought
 
Modules and injector
Eyal Vardi
 
Intro to Angular.JS Directives
Christian Lilley
 
Angular Promises and Advanced Routing
Alexe Bogdan
 
Filters in AngularJS
Brajesh Yadav
 
AngularJS Compile Process
Eyal Vardi
 
Dart and AngularDart
Loc Nguyen
 

Similar to Building an End-to-End AngularJS Application (20)

PPTX
AngularJS.part1
Andrey Kolodnitsky
 
PPTX
Angular Workshop_Sarajevo2
Christoffer Noring
 
PPT
AngularJS and SPA
Lorenzo Dematté
 
PPTX
Angular js 1.0-fundamentals
Venkatesh Narayanan
 
PPTX
AngularJS = Browser applications on steroids
Maurice De Beijer [MVP]
 
PDF
Angular server-side communication
Alexe Bogdan
 
PPTX
Basics of AngularJS
Filip Janevski
 
PPTX
AngularJs-training
Pratchaya Suputsopon
 
KEY
Javascript Frameworks for Well Architected, Immersive Web Apps
dnelson-cs
 
ODP
AngularJs Crash Course
Keith Bloomfield
 
PPT
Introduction to AngularJS
Anass90
 
PDF
Angular.js is super cool
Maksym Hopei
 
PDF
An Introduction to AngularJS
Falk Hartmann
 
PPTX
Angular js training in pune course content By Advanto Software
Advanto Software
 
PDF
Workshop 13: AngularJS Parte II
Visual Engineering
 
PPTX
Angular Presentation
Adam Moore
 
PPTX
Introduction to AngularJs
murtazahaveliwala
 
PPTX
01 startoff angularjs
Erhwen Kuo
 
PPTX
Intro to AngularJs
SolTech, Inc.
 
AngularJS.part1
Andrey Kolodnitsky
 
Angular Workshop_Sarajevo2
Christoffer Noring
 
AngularJS and SPA
Lorenzo Dematté
 
Angular js 1.0-fundamentals
Venkatesh Narayanan
 
AngularJS = Browser applications on steroids
Maurice De Beijer [MVP]
 
Angular server-side communication
Alexe Bogdan
 
Basics of AngularJS
Filip Janevski
 
AngularJs-training
Pratchaya Suputsopon
 
Javascript Frameworks for Well Architected, Immersive Web Apps
dnelson-cs
 
AngularJs Crash Course
Keith Bloomfield
 
Introduction to AngularJS
Anass90
 
Angular.js is super cool
Maksym Hopei
 
An Introduction to AngularJS
Falk Hartmann
 
Angular js training in pune course content By Advanto Software
Advanto Software
 
Workshop 13: AngularJS Parte II
Visual Engineering
 
Angular Presentation
Adam Moore
 
Introduction to AngularJs
murtazahaveliwala
 
01 startoff angularjs
Erhwen Kuo
 
Intro to AngularJs
SolTech, Inc.
 
Ad

More from Dan Wahlin (7)

PPTX
Development Trends - What's New in the World of Web Development
Dan Wahlin
 
PPTX
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Dan Wahlin
 
PPTX
JavaScript Patterns to Cleanup your Code
Dan Wahlin
 
PPTX
Getting Started Building Windows 8 HTML/JavaScript Metro Apps
Dan Wahlin
 
PPT
Using jQuery Templates
Dan Wahlin
 
PPTX
Integrating Security Roles into Microsoft Silverlight Applications
Dan Wahlin
 
PPTX
Getting Started with ASP.NET MVC 3 and Razor
Dan Wahlin
 
Development Trends - What's New in the World of Web Development
Dan Wahlin
 
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Dan Wahlin
 
JavaScript Patterns to Cleanup your Code
Dan Wahlin
 
Getting Started Building Windows 8 HTML/JavaScript Metro Apps
Dan Wahlin
 
Using jQuery Templates
Dan Wahlin
 
Integrating Security Roles into Microsoft Silverlight Applications
Dan Wahlin
 
Getting Started with ASP.NET MVC 3 and Razor
Dan Wahlin
 
Ad

Recently uploaded (20)

PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Seamless Tech Experiences Showcasing Cross-Platform App Design.pptx
presentifyai
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 

Building an End-to-End AngularJS Application

Editor's Notes

  • #38: &lt;divclass=&quot;error-container&quot;ng-show=&quot;signup_form.username.$dirty &amp;&amp; signup_form.username.$invalid&quot;&gt;&lt;smallclass=&quot;error&quot;ng-show=&quot;signup_form.username.$error.required&quot;&gt;Please input a username&lt;/small&gt;&lt;smallclass=&quot;error&quot;ng-show=&quot;signup_form.username.$error.minlength&quot;&gt;Your username is required to be at least 3 characters&lt;/small&gt;&lt;smallclass=&quot;error&quot;ng-show=&quot;signup_form.username.$error.maxlength&quot;&gt;Your username cannot be longer than 20 characters&lt;/small&gt;&lt;smallclass=&quot;error&quot;ng-show=&quot;signup_form.username.$error.unique&quot;&gt;That username is taken, please try another&lt;/small&gt;&lt;/div&gt;