SlideShare a Scribd company logo
Angular.JS
Presenter: Nakul Suneja, Mindfire Solutions
Date: 26/03/2015
Introduction To AngularJS.
1. Single Page Application.
2.What is Angular.js?
3.Why Angular.j
4.Modules.
5.Controllers
6.Views
7.Directives
8.Angular Routes
9.Custom Directives
10. Angular Services & Custom Services Demo
11. Filters & Custom Filters Demo.
Presenter:Nakul, Mindfire Solutions
Single Page Application
View View
ViewView
The Future Of Tomorrow's Web with SOA( Service Oriented Architecture). To provide User a Native
web-app Experience.
SPA
Presenter:Nakul, Mindfire Solutions
The Challenge with SPA
DOM Manipulation History Module Loading
Routing Caching Object Modeling
Data Binding Ajax/Promises View Loading
Presenter: Nakul, Mindfire Solutions
What is AngularJS?
This is a MV*(MVC OR MVVM) Javascript Framework by Google for Rich Web
Application Development & Provide User a Native App by following SPA Design
Pattern.
Model
(Data)
Controlle
r (Logic)
View (UI)Notifies
NotifiesChanges
Model
(Data)
View (UI)
Controller
(Logic)
MVC
View (UI) MVVM
Presenter: Nakul, Mindfire Solutions
“Other frameworks deal with HTML’s shortcomings by either abstracting away HTML, CSS, and/or JavaScript
or by providing an imperative way for manipulating the DOM. Neither of these address the root problem
that HTML was not designed for dynamic views”.
Angular JS Power:
l Structure, Quality and Organization
l Lightweight ( < 36KB compressed and minified).
l Free.
l Separation of concern.
l Modularity.
l Extensibility & Maintainability.
l Reusable Components.
Why AngularJS?
Presenter: Nakul, Mindfire Solutions
Why AngularJS?
This means that any changes to the data need to be re-merged with the
template and then innerHTMLed into the DOM. Some of the issues with
this approach are:
 Reading user input and merging it with data
 Clobbering user input by overwriting it
 Managing the whole update process
The Angular compiler consumes the DOM, not string templates.
The result is a linking function, which when combined with a
scope model results in a live view. The view and scope model
bindings are transparent.
Other Javascript MV* Frameworks
•BackboneJS
•EmberJS
Presenter: Nakul, Mindfire Solutions
Two-way Data Binding – ViewModel as single source of truth (Glue).
MV*(MVC OR MVVM) – Provides Two-way Data Binding.
Modules.
Directives & Custom Directives – Extend HTML.
Services & Factories.
Dependency Injection.
Watcher.
Digest.
Testing.
Deep Linking (Map URL to route Definition).
Server-Side Communication.
Features of AngularJS
Presenter: Nakul, Mindfire Solutions
Presenter: Nakul, Mindfire Solutions
View Controller
FactoryDirectives
Routes
Module
Config
Modules are Containers
Service Provider
$scope
// Module Creation
var carApp = angular.module('CarApp', []);
// Dependencies Injection
var demoApp = angular.module('carApp', ['helperModule']);
Creating a Module
Presenter: Nakul, Mindfire Solutions
var carApp = angular.module('CarApp', []);
carApp.controller('HyundaiController', function ($scope) {
$scope.articles = [
{'name' : 'i20 Elite'},
{'name' : 'Fludic Verna'},
{'name': 'Xcent'},
{'name' : 'Eon'},
{'name' : 'i10 Grand'}
];
});
Define a Module
Define a
Controller
Creating a Controller in a Module
Presenter: Nakul, Mindfire Solutions
Presenter: Nakul, Mindfire Solutions
Directives are markers on Dom Elements(such as attributes, tags, and class
names) that tell HTML compiler ($compile) to attach a given behavior to a
DOM element (or transform it, replace it, etc.),When Angular bootstraps
your application, the HTML compiler traverses the DOM matching
directives against the DOM elements.
Some angular built-in directives
lThe ng-app - Bootstrapping your app and defining its scope. (<html ng-
app>).
lThe ng-controller - defines which controller will be in charge of your view.
(<input ng-controller=”xyz”>).
lThe ng-repeat - Allows for looping through collections.
lThe ng-init – Allows to Initialize any Data Model Object.
What is a Directive?
Presenter: Nakul, Mindfire Solutions
AngularJS Help for Directives
<!DOCTYPE html>
<html ng-app>
<head>
<title>Examples</title>
</head>
<body>
<div class="container">
Name: <input type="text" ng-model="name" /> {{ name }}
</div>
<script src="Scripts/angular.js"></script>
</body>
</html>
Using Directives and Data Binding
Presenter: Nakul, Mindfire Solutions
Data Binding Expression
Directive
Presenter: Nakul, Mindfire Solutions
View, Controllers & Scope
View Controller$scope
$scope is the "glue" (ViewModel) between a controller and a view
Presenter: Nakul, Mindfire Solutions
Creating a View and Controller
<div class="examples" data-ng-controller="HyundaiController">
<h3>Adding a Simple Controller</h3>
<ul>
<li data-ng-repeat="car in articles">
{{ car.name }}
</li>
</ul>
</div>
<script>
var carApp = angular.module('CarAPP', []);
carApp.controller('HyundaiController', function ($scope) {
$scope.articles = [
{'name' : 'i20 Elite'},
{'name' : 'Fludic Verna'},
{'name': 'Xcent'},
{'name' : 'Eon'},
{'name' : 'i10 Grand'}
];
});
</script>
Angular Routes & DI
<html ng-app=”AutomobileApp”>
<div class=”container”>
<nav><a href=”#/hyundai”>Hyundai</a><a href=”#/maruti”>Maruti</a></nav>
<div ng-view></div>
</div>
</html>
<script>
angular.module('AutomobileApp', [ 'ngRoute', 'CarApp']).
config(['$routeProvider', function($routeProvider) {
$routeProvider.
when('/hyundai', {
templateUrl: 'hyundai.html', // To manage Hyundai Module.
controller: 'HyundaiController'
}).
when('/maruti', { // To manage Maruti Module.
templateUrl: 'maruti.html',
controller: 'MarutiController'
}). otherwise({ // Default Action.
RedirectTo: '/hyundai'
});
</script>
Custom Directives
'use strict';
var app = angular.module('CarApp', []);
// Car Controller
app.controller('HyundaiController', function($scope){
$scope.properties = {
'make' : '2015',
'wheels' : 4,
};
$scope.cars = [
{'name' : 'i20 Elite'},
{'name' : 'Fludic Verna'},
{'name': 'Xcent'},
{'name' : 'Eon'},
{'name' : 'i10 Grand'}
];
}).directive('car', function(){
return {
restrict: 'E',
templateUrl: 'cars.html'
};
});
Presenter: Nakul, Mindfire Solutions
Angular Services.
Angular services are substitutable objects that are wired together using dependency injection (DI). You
can use services to organize and share code across your app.
Angular services are:
Lazily instantiated – Angular only instantiates a service when an application component depends on it.
Singletons – Each component dependent on a service gets a reference to the single instance
generated by the service factory.
Angular offers several useful services (like $http), but for most applications you'll also want to create
your own.
Filters & Custom Filters
A filter formats the value of an expression for display to the user. They can be used in view
templates, controllers or services and it is easy to define your own filter.
{{ expression | filter1 | filter2 | ... }}
We have in-built Filters Available as
Number : {{ 1234 | number:2 }}
Currency : {{ 12 | currency }}
Date: {{ date_expression | date : format : timezone}}
Lowercase : {{ lowercase_expression | lowercase}}
Uppercase : {{ lowercase_expression | uppercase}}
Filter : <tr ng-repeat="friend in friends | filter:'a'">
OrderBy : <tr ng-repeat="friend in friends | orderBy:'-age'">
LimitTo : {{ numbers | limitTo:numLimit }}
Custom Filter :
app.filter('reverse', function() { // Custom Filter
Reverse
return function(input) {
var out = input.split('').reverse().join();
return out;
};
});
Presenter: Nakul, Mindfire Solutions
Next Seminar : Angular in Depth.
Angular Custom Directives in Depth.
Isolated Scopes.
Reusable Custom Directives.
Communication in Custom Directives.
Services, Factories Providers & Value in Depth.
Custom Services & Factories in Depth.
Event Binding in the Templates.
Unit Testing with AngularJS.
Presenter: Nakul, Mindfire Solutions
QUESTIONS?
Presenter: Nakul, Mindfire Solutions
References
I. Angular Docs → https://angularjs.org/
I. Tutorial Point → http://www.tutorialspoint.com/angularjs/
I. Head First Diving into Angularjs.
Presenter: Nakul, Mindfire Solutions
Thank you

More Related Content

What's hot

Angular js
Angular jsAngular js
Angular js
Knoldus Inc.
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
Narek Mamikonyan
 
Introduction to Angular JS
Introduction to Angular JSIntroduction to Angular JS
Introduction to Angular JS
Santhosh Kumar Srinivasan
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slidessamhelman
 
Getting Started with Angular JS
Getting Started with Angular JSGetting Started with Angular JS
Getting Started with Angular JS
Akshay Mathur
 
AngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsAngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsMaurice De Beijer [MVP]
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS intro
dizabl
 
Introduction of angular js
Introduction of angular jsIntroduction of angular js
Introduction of angular js
Tamer Solieman
 
Gettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSGettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJS
Armin Vieweg
 
Angular js for beginners
Angular js for beginnersAngular js for beginners
Angular js for beginners
Munir Hoque
 
AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Aldo Pizzagalli
 
Overview about AngularJS Framework
Overview about AngularJS Framework Overview about AngularJS Framework
Overview about AngularJS Framework
Camilo Lopes
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
Shyam Seshadri
 
Front end development with Angular JS
Front end development with Angular JSFront end development with Angular JS
Front end development with Angular JS
Bipin
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introduction
Tania Gonzales
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
Sagar Acharya
 
Introduction to Angular js 2.0
Introduction to Angular js 2.0Introduction to Angular js 2.0
Introduction to Angular js 2.0
Nagaraju Sangam
 
Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014
Stéphane Bégaudeau
 

What's hot (20)

Angular js
Angular jsAngular js
Angular js
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
 
Introduction to Angular JS
Introduction to Angular JSIntroduction to Angular JS
Introduction to Angular JS
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slides
 
Getting Started with Angular JS
Getting Started with Angular JSGetting Started with Angular JS
Getting Started with Angular JS
 
AngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsAngularJS = Browser applications on steroids
AngularJS = Browser applications on steroids
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS intro
 
Introduction of angular js
Introduction of angular jsIntroduction of angular js
Introduction of angular js
 
Gettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSGettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJS
 
Angular js for beginners
Angular js for beginnersAngular js for beginners
Angular js for beginners
 
AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Overview about AngularJS Framework
Overview about AngularJS Framework Overview about AngularJS Framework
Overview about AngularJS Framework
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
 
Front end development with Angular JS
Front end development with Angular JSFront end development with Angular JS
Front end development with Angular JS
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introduction
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
 
Introduction to Angular js 2.0
Introduction to Angular js 2.0Introduction to Angular js 2.0
Introduction to Angular js 2.0
 
Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014Modern Web Application Development Workflow - EclipseCon Europe 2014
Modern Web Application Development Workflow - EclipseCon Europe 2014
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 

Viewers also liked

Benefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular jsBenefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular js
Harbinger Systems - HRTech Builder of Choice
 
Single page application 04
Single page application   04Single page application   04
Single page application 04
Ismaeel Enjreny
 
Services Factory Provider Value Constant - AngularJS
Services Factory Provider Value Constant - AngularJSServices Factory Provider Value Constant - AngularJS
Services Factory Provider Value Constant - AngularJS
Sumanth krishna
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
Betclic Everest Group Tech Team
 
Getting Single Page Application Security Right
Getting Single Page Application Security RightGetting Single Page Application Security Right
Getting Single Page Application Security Right
Philippe De Ryck
 
GRASP – паттерны Объектно-Ориентированного Проектирования
GRASP – паттерны Объектно-Ориентированного ПроектированияGRASP – паттерны Объектно-Ориентированного Проектирования
GRASP – паттерны Объектно-Ориентированного ПроектированияAlexander Nemanov
 
Building scalable applications with angular js
Building scalable applications with angular jsBuilding scalable applications with angular js
Building scalable applications with angular js
Andrew Alpert
 
Принципы проектирования S.O.L.I.D
Принципы проектирования S.O.L.I.DПринципы проектирования S.O.L.I.D
Принципы проектирования S.O.L.I.D
AndreyGeonya
 
SOLID & GRASP
SOLID & GRASPSOLID & GRASP
SOLID & GRASPdevel123
 
Super Advanced Python –act1
Super Advanced Python –act1Super Advanced Python –act1
Super Advanced Python –act1
Ke Wei Louis
 
Django e il Rap Elia Contini
Django e il Rap Elia ContiniDjango e il Rap Elia Contini
Django e il Rap Elia ContiniWEBdeBS
 
Vim for Mere Mortals
Vim for Mere MortalsVim for Mere Mortals
Vim for Mere Mortals
Clayton Parker
 
2016 py con2016_lightingtalk_php to python
2016 py con2016_lightingtalk_php to python2016 py con2016_lightingtalk_php to python
2016 py con2016_lightingtalk_php to python
Jiho Lee
 
Django mongodb -djangoday_
Django mongodb -djangoday_Django mongodb -djangoday_
Django mongodb -djangoday_WEBdeBS
 
PythonBrasil[8] closing
PythonBrasil[8] closingPythonBrasil[8] closing
PythonBrasil[8] closing
Tatiana Al-Chueyr
 
Digesting jQuery
Digesting jQueryDigesting jQuery
Digesting jQuery
Mindfire Solutions
 
PyClab.__init__(self)
PyClab.__init__(self)PyClab.__init__(self)
PyClab.__init__(self)
Tzu-ping Chung
 
Authentication & Authorization in ASPdotNet MVC
Authentication & Authorization in ASPdotNet MVCAuthentication & Authorization in ASPdotNet MVC
Authentication & Authorization in ASPdotNet MVC
Mindfire Solutions
 
Website optimization
Website optimizationWebsite optimization
Website optimization
Mindfire Solutions
 

Viewers also liked (20)

Benefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular jsBenefits of developing single page web applications using angular js
Benefits of developing single page web applications using angular js
 
Single page application 04
Single page application   04Single page application   04
Single page application 04
 
Services Factory Provider Value Constant - AngularJS
Services Factory Provider Value Constant - AngularJSServices Factory Provider Value Constant - AngularJS
Services Factory Provider Value Constant - AngularJS
 
Training: MVVM Pattern
Training: MVVM PatternTraining: MVVM Pattern
Training: MVVM Pattern
 
Getting Single Page Application Security Right
Getting Single Page Application Security RightGetting Single Page Application Security Right
Getting Single Page Application Security Right
 
GRASP – паттерны Объектно-Ориентированного Проектирования
GRASP – паттерны Объектно-Ориентированного ПроектированияGRASP – паттерны Объектно-Ориентированного Проектирования
GRASP – паттерны Объектно-Ориентированного Проектирования
 
Building scalable applications with angular js
Building scalable applications with angular jsBuilding scalable applications with angular js
Building scalable applications with angular js
 
Принципы проектирования S.O.L.I.D
Принципы проектирования S.O.L.I.DПринципы проектирования S.O.L.I.D
Принципы проектирования S.O.L.I.D
 
SOLID & GRASP
SOLID & GRASPSOLID & GRASP
SOLID & GRASP
 
Super Advanced Python –act1
Super Advanced Python –act1Super Advanced Python –act1
Super Advanced Python –act1
 
Django e il Rap Elia Contini
Django e il Rap Elia ContiniDjango e il Rap Elia Contini
Django e il Rap Elia Contini
 
Vim for Mere Mortals
Vim for Mere MortalsVim for Mere Mortals
Vim for Mere Mortals
 
2016 py con2016_lightingtalk_php to python
2016 py con2016_lightingtalk_php to python2016 py con2016_lightingtalk_php to python
2016 py con2016_lightingtalk_php to python
 
Django mongodb -djangoday_
Django mongodb -djangoday_Django mongodb -djangoday_
Django mongodb -djangoday_
 
PythonBrasil[8] closing
PythonBrasil[8] closingPythonBrasil[8] closing
PythonBrasil[8] closing
 
Digesting jQuery
Digesting jQueryDigesting jQuery
Digesting jQuery
 
EuroDjangoCon 2009 - Ein Rückblick
EuroDjangoCon 2009 - Ein RückblickEuroDjangoCon 2009 - Ein Rückblick
EuroDjangoCon 2009 - Ein Rückblick
 
PyClab.__init__(self)
PyClab.__init__(self)PyClab.__init__(self)
PyClab.__init__(self)
 
Authentication & Authorization in ASPdotNet MVC
Authentication & Authorization in ASPdotNet MVCAuthentication & Authorization in ASPdotNet MVC
Authentication & Authorization in ASPdotNet MVC
 
Website optimization
Website optimizationWebsite optimization
Website optimization
 

Similar to Introduction to single page application with angular js

Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
Gaurav Agrawal
 
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
 
Angular js
Angular jsAngular js
Angular js
vu van quyet
 
angularJs Workshop
angularJs WorkshopangularJs Workshop
angularJs Workshop
Ran Wahle
 
Leveling up with AngularJS
Leveling up with AngularJSLeveling up with AngularJS
Leveling up with AngularJS
Austin Condiff
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
Nitin Giri
 
Valentine with AngularJS
Valentine with AngularJSValentine with AngularJS
Valentine with AngularJS
Vidyasagar Machupalli
 
Angular js
Angular jsAngular js
Angular js
Baldeep Sohal
 
Angular Js Basics
Angular Js BasicsAngular Js Basics
Angular Js Basics
أحمد عبد الوهاب
 
Angular Js Get Started - Complete Course
Angular Js Get Started - Complete CourseAngular Js Get Started - Complete Course
Angular Js Get Started - Complete Course
EPAM Systems
 
Angular js workshop
Angular js workshopAngular js workshop
Angular js workshop
Rolands Krumbergs
 
Angularjs Basics
Angularjs BasicsAngularjs Basics
Angularjs Basics
Anuradha Bandara
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
AngularJS By Vipin
AngularJS By VipinAngularJS By Vipin
AngularJS By Vipin
Vipin Mundayad
 
AngularJS: Overview & Key Features
AngularJS: Overview & Key FeaturesAngularJS: Overview & Key Features
AngularJS: Overview & Key Features
Mohamad Al Asmar
 
Angular Presentation
Angular PresentationAngular Presentation
Angular PresentationAdam Moore
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
Aayush Shrestha
 
Angular js
Angular jsAngular js
Modern webtechnologies
Modern webtechnologiesModern webtechnologies
Modern webtechnologies
Besjan Xhika
 

Similar to Introduction to single page application with angular js (20)

Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014AngularJs Workshop SDP December 28th 2014
AngularJs Workshop SDP December 28th 2014
 
Angular js
Angular jsAngular js
Angular js
 
angularJs Workshop
angularJs WorkshopangularJs Workshop
angularJs Workshop
 
Leveling up with AngularJS
Leveling up with AngularJSLeveling up with AngularJS
Leveling up with AngularJS
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
 
Angular js
Angular jsAngular js
Angular js
 
Valentine with AngularJS
Valentine with AngularJSValentine with AngularJS
Valentine with AngularJS
 
Angular js
Angular jsAngular js
Angular js
 
Angular Js Basics
Angular Js BasicsAngular Js Basics
Angular Js Basics
 
Angular Js Get Started - Complete Course
Angular Js Get Started - Complete CourseAngular Js Get Started - Complete Course
Angular Js Get Started - Complete Course
 
Angular js workshop
Angular js workshopAngular js workshop
Angular js workshop
 
Angularjs Basics
Angularjs BasicsAngularjs Basics
Angularjs Basics
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js Tutorials
 
AngularJS By Vipin
AngularJS By VipinAngularJS By Vipin
AngularJS By Vipin
 
AngularJS: Overview & Key Features
AngularJS: Overview & Key FeaturesAngularJS: Overview & Key Features
AngularJS: Overview & Key Features
 
Angular Presentation
Angular PresentationAngular Presentation
Angular Presentation
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
 
Angular js
Angular jsAngular js
Angular js
 
Modern webtechnologies
Modern webtechnologiesModern webtechnologies
Modern webtechnologies
 

More from Mindfire Solutions

Physician Search and Review
Physician Search and ReviewPhysician Search and Review
Physician Search and Review
Mindfire Solutions
 
diet management app
diet management appdiet management app
diet management app
Mindfire Solutions
 
Business Technology Solution
Business Technology SolutionBusiness Technology Solution
Business Technology Solution
Mindfire Solutions
 
Remote Health Monitoring
Remote Health MonitoringRemote Health Monitoring
Remote Health Monitoring
Mindfire Solutions
 
Influencer Marketing Solution
Influencer Marketing SolutionInfluencer Marketing Solution
Influencer Marketing Solution
Mindfire Solutions
 
ELMAH
ELMAHELMAH
High Availability of Azure Applications
High Availability of Azure ApplicationsHigh Availability of Azure Applications
High Availability of Azure Applications
Mindfire Solutions
 
IOT Hands On
IOT Hands OnIOT Hands On
IOT Hands On
Mindfire Solutions
 
Glimpse of Loops Vs Set
Glimpse of Loops Vs SetGlimpse of Loops Vs Set
Glimpse of Loops Vs Set
Mindfire Solutions
 
Oracle Sql Developer-Getting Started
Oracle Sql Developer-Getting StartedOracle Sql Developer-Getting Started
Oracle Sql Developer-Getting Started
Mindfire Solutions
 
Adaptive Layout In iOS 8
Adaptive Layout In iOS 8Adaptive Layout In iOS 8
Adaptive Layout In iOS 8
Mindfire Solutions
 
Introduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/MacIntroduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/Mac
Mindfire Solutions
 
LINQPad - utility Tool
LINQPad - utility ToolLINQPad - utility Tool
LINQPad - utility Tool
Mindfire Solutions
 
Get started with watch kit development
Get started with watch kit developmentGet started with watch kit development
Get started with watch kit development
Mindfire Solutions
 
Swift vs Objective-C
Swift vs Objective-CSwift vs Objective-C
Swift vs Objective-C
Mindfire Solutions
 
Material Design in Android
Material Design in AndroidMaterial Design in Android
Material Design in Android
Mindfire Solutions
 
Introduction to OData
Introduction to ODataIntroduction to OData
Introduction to OData
Mindfire Solutions
 
Ext js Part 2- MVC
Ext js Part 2- MVCExt js Part 2- MVC
Ext js Part 2- MVC
Mindfire Solutions
 
ExtJs Basic Part-1
ExtJs Basic Part-1ExtJs Basic Part-1
ExtJs Basic Part-1
Mindfire Solutions
 
Spring Security Introduction
Spring Security IntroductionSpring Security Introduction
Spring Security Introduction
Mindfire Solutions
 

More from Mindfire Solutions (20)

Physician Search and Review
Physician Search and ReviewPhysician Search and Review
Physician Search and Review
 
diet management app
diet management appdiet management app
diet management app
 
Business Technology Solution
Business Technology SolutionBusiness Technology Solution
Business Technology Solution
 
Remote Health Monitoring
Remote Health MonitoringRemote Health Monitoring
Remote Health Monitoring
 
Influencer Marketing Solution
Influencer Marketing SolutionInfluencer Marketing Solution
Influencer Marketing Solution
 
ELMAH
ELMAHELMAH
ELMAH
 
High Availability of Azure Applications
High Availability of Azure ApplicationsHigh Availability of Azure Applications
High Availability of Azure Applications
 
IOT Hands On
IOT Hands OnIOT Hands On
IOT Hands On
 
Glimpse of Loops Vs Set
Glimpse of Loops Vs SetGlimpse of Loops Vs Set
Glimpse of Loops Vs Set
 
Oracle Sql Developer-Getting Started
Oracle Sql Developer-Getting StartedOracle Sql Developer-Getting Started
Oracle Sql Developer-Getting Started
 
Adaptive Layout In iOS 8
Adaptive Layout In iOS 8Adaptive Layout In iOS 8
Adaptive Layout In iOS 8
 
Introduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/MacIntroduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/Mac
 
LINQPad - utility Tool
LINQPad - utility ToolLINQPad - utility Tool
LINQPad - utility Tool
 
Get started with watch kit development
Get started with watch kit developmentGet started with watch kit development
Get started with watch kit development
 
Swift vs Objective-C
Swift vs Objective-CSwift vs Objective-C
Swift vs Objective-C
 
Material Design in Android
Material Design in AndroidMaterial Design in Android
Material Design in Android
 
Introduction to OData
Introduction to ODataIntroduction to OData
Introduction to OData
 
Ext js Part 2- MVC
Ext js Part 2- MVCExt js Part 2- MVC
Ext js Part 2- MVC
 
ExtJs Basic Part-1
ExtJs Basic Part-1ExtJs Basic Part-1
ExtJs Basic Part-1
 
Spring Security Introduction
Spring Security IntroductionSpring Security Introduction
Spring Security Introduction
 

Recently uploaded

Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
varshanayak241
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
KrzysztofKkol1
 

Recently uploaded (20)

Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
Strategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptxStrategies for Successful Data Migration Tools.pptx
Strategies for Successful Data Migration Tools.pptx
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 

Introduction to single page application with angular js

  • 1. Angular.JS Presenter: Nakul Suneja, Mindfire Solutions Date: 26/03/2015
  • 2. Introduction To AngularJS. 1. Single Page Application. 2.What is Angular.js? 3.Why Angular.j 4.Modules. 5.Controllers 6.Views 7.Directives 8.Angular Routes 9.Custom Directives 10. Angular Services & Custom Services Demo 11. Filters & Custom Filters Demo.
  • 3. Presenter:Nakul, Mindfire Solutions Single Page Application View View ViewView The Future Of Tomorrow's Web with SOA( Service Oriented Architecture). To provide User a Native web-app Experience. SPA
  • 4. Presenter:Nakul, Mindfire Solutions The Challenge with SPA DOM Manipulation History Module Loading Routing Caching Object Modeling Data Binding Ajax/Promises View Loading
  • 5. Presenter: Nakul, Mindfire Solutions What is AngularJS? This is a MV*(MVC OR MVVM) Javascript Framework by Google for Rich Web Application Development & Provide User a Native App by following SPA Design Pattern. Model (Data) Controlle r (Logic) View (UI)Notifies NotifiesChanges Model (Data) View (UI) Controller (Logic) MVC View (UI) MVVM
  • 6. Presenter: Nakul, Mindfire Solutions “Other frameworks deal with HTML’s shortcomings by either abstracting away HTML, CSS, and/or JavaScript or by providing an imperative way for manipulating the DOM. Neither of these address the root problem that HTML was not designed for dynamic views”. Angular JS Power: l Structure, Quality and Organization l Lightweight ( < 36KB compressed and minified). l Free. l Separation of concern. l Modularity. l Extensibility & Maintainability. l Reusable Components. Why AngularJS?
  • 7. Presenter: Nakul, Mindfire Solutions Why AngularJS? This means that any changes to the data need to be re-merged with the template and then innerHTMLed into the DOM. Some of the issues with this approach are:  Reading user input and merging it with data  Clobbering user input by overwriting it  Managing the whole update process The Angular compiler consumes the DOM, not string templates. The result is a linking function, which when combined with a scope model results in a live view. The view and scope model bindings are transparent.
  • 8. Other Javascript MV* Frameworks •BackboneJS •EmberJS Presenter: Nakul, Mindfire Solutions
  • 9. Two-way Data Binding – ViewModel as single source of truth (Glue). MV*(MVC OR MVVM) – Provides Two-way Data Binding. Modules. Directives & Custom Directives – Extend HTML. Services & Factories. Dependency Injection. Watcher. Digest. Testing. Deep Linking (Map URL to route Definition). Server-Side Communication. Features of AngularJS Presenter: Nakul, Mindfire Solutions
  • 10. Presenter: Nakul, Mindfire Solutions View Controller FactoryDirectives Routes Module Config Modules are Containers Service Provider $scope
  • 11. // Module Creation var carApp = angular.module('CarApp', []); // Dependencies Injection var demoApp = angular.module('carApp', ['helperModule']); Creating a Module Presenter: Nakul, Mindfire Solutions
  • 12. var carApp = angular.module('CarApp', []); carApp.controller('HyundaiController', function ($scope) { $scope.articles = [ {'name' : 'i20 Elite'}, {'name' : 'Fludic Verna'}, {'name': 'Xcent'}, {'name' : 'Eon'}, {'name' : 'i10 Grand'} ]; }); Define a Module Define a Controller Creating a Controller in a Module Presenter: Nakul, Mindfire Solutions
  • 13. Presenter: Nakul, Mindfire Solutions Directives are markers on Dom Elements(such as attributes, tags, and class names) that tell HTML compiler ($compile) to attach a given behavior to a DOM element (or transform it, replace it, etc.),When Angular bootstraps your application, the HTML compiler traverses the DOM matching directives against the DOM elements. Some angular built-in directives lThe ng-app - Bootstrapping your app and defining its scope. (<html ng- app>). lThe ng-controller - defines which controller will be in charge of your view. (<input ng-controller=”xyz”>). lThe ng-repeat - Allows for looping through collections. lThe ng-init – Allows to Initialize any Data Model Object. What is a Directive?
  • 14. Presenter: Nakul, Mindfire Solutions AngularJS Help for Directives
  • 15. <!DOCTYPE html> <html ng-app> <head> <title>Examples</title> </head> <body> <div class="container"> Name: <input type="text" ng-model="name" /> {{ name }} </div> <script src="Scripts/angular.js"></script> </body> </html> Using Directives and Data Binding Presenter: Nakul, Mindfire Solutions Data Binding Expression Directive
  • 16. Presenter: Nakul, Mindfire Solutions View, Controllers & Scope View Controller$scope $scope is the "glue" (ViewModel) between a controller and a view
  • 17. Presenter: Nakul, Mindfire Solutions Creating a View and Controller <div class="examples" data-ng-controller="HyundaiController"> <h3>Adding a Simple Controller</h3> <ul> <li data-ng-repeat="car in articles"> {{ car.name }} </li> </ul> </div> <script> var carApp = angular.module('CarAPP', []); carApp.controller('HyundaiController', function ($scope) { $scope.articles = [ {'name' : 'i20 Elite'}, {'name' : 'Fludic Verna'}, {'name': 'Xcent'}, {'name' : 'Eon'}, {'name' : 'i10 Grand'} ]; }); </script>
  • 18. Angular Routes & DI <html ng-app=”AutomobileApp”> <div class=”container”> <nav><a href=”#/hyundai”>Hyundai</a><a href=”#/maruti”>Maruti</a></nav> <div ng-view></div> </div> </html> <script> angular.module('AutomobileApp', [ 'ngRoute', 'CarApp']). config(['$routeProvider', function($routeProvider) { $routeProvider. when('/hyundai', { templateUrl: 'hyundai.html', // To manage Hyundai Module. controller: 'HyundaiController' }). when('/maruti', { // To manage Maruti Module. templateUrl: 'maruti.html', controller: 'MarutiController' }). otherwise({ // Default Action. RedirectTo: '/hyundai' }); </script>
  • 19. Custom Directives 'use strict'; var app = angular.module('CarApp', []); // Car Controller app.controller('HyundaiController', function($scope){ $scope.properties = { 'make' : '2015', 'wheels' : 4, }; $scope.cars = [ {'name' : 'i20 Elite'}, {'name' : 'Fludic Verna'}, {'name': 'Xcent'}, {'name' : 'Eon'}, {'name' : 'i10 Grand'} ]; }).directive('car', function(){ return { restrict: 'E', templateUrl: 'cars.html' }; }); Presenter: Nakul, Mindfire Solutions
  • 20. Angular Services. Angular services are substitutable objects that are wired together using dependency injection (DI). You can use services to organize and share code across your app. Angular services are: Lazily instantiated – Angular only instantiates a service when an application component depends on it. Singletons – Each component dependent on a service gets a reference to the single instance generated by the service factory. Angular offers several useful services (like $http), but for most applications you'll also want to create your own.
  • 21. Filters & Custom Filters A filter formats the value of an expression for display to the user. They can be used in view templates, controllers or services and it is easy to define your own filter. {{ expression | filter1 | filter2 | ... }} We have in-built Filters Available as Number : {{ 1234 | number:2 }} Currency : {{ 12 | currency }} Date: {{ date_expression | date : format : timezone}} Lowercase : {{ lowercase_expression | lowercase}} Uppercase : {{ lowercase_expression | uppercase}} Filter : <tr ng-repeat="friend in friends | filter:'a'"> OrderBy : <tr ng-repeat="friend in friends | orderBy:'-age'"> LimitTo : {{ numbers | limitTo:numLimit }} Custom Filter : app.filter('reverse', function() { // Custom Filter Reverse return function(input) { var out = input.split('').reverse().join(); return out; }; });
  • 22. Presenter: Nakul, Mindfire Solutions Next Seminar : Angular in Depth. Angular Custom Directives in Depth. Isolated Scopes. Reusable Custom Directives. Communication in Custom Directives. Services, Factories Providers & Value in Depth. Custom Services & Factories in Depth. Event Binding in the Templates. Unit Testing with AngularJS.
  • 23. Presenter: Nakul, Mindfire Solutions QUESTIONS?
  • 24. Presenter: Nakul, Mindfire Solutions References I. Angular Docs → https://angularjs.org/ I. Tutorial Point → http://www.tutorialspoint.com/angularjs/ I. Head First Diving into Angularjs.
  • 25. Presenter: Nakul, Mindfire Solutions Thank you