SlideShare a Scribd company logo
1 of 21
Manmohan Singh 
Internet Marketing Engg. 
Miracle Studios
AngularJS is a superheroic JavaScript MVW framework. 
It can be added to an HTML page with a <script> tag. It 
extends HTML attributes with Directives, and binds 
data to HTML with Expressions. 
<script 
src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2. 
15/angular.min.js"></script>
<!DOCTYPE html> 
<html> 
<body> 
<div ng-app=""> 
<p>Name: <input type="text" ng-model="name"></p> 
<p ng-bind="name"></p> 
</div> 
<script 
src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular. 
min.js"></script> 
</body> 
</html>
Model 
Controller View
 Extends HTML with directives 
 Model View Controller architecture 
 Dependency injections 
 Declarative two way data binding 
 Build with testing in mind 
 Dynamic templates
At a high level, directives are markers on a DOM element such as 
 Attribute 
 Element name 
 Comment 
 CSS Class 
That tell AngularJS's HTML compiler to attach a specified 
behavior to that DOM element or even transform the DOM 
element and its sub elements.
myapp = angular.module("myapp", []); 
myapp.directive('div', function() { 
var directive = {}; 
directive.restrict = 'E'; /* restrict this directive to elements */ 
directive.template = "My first directive: {{textToInsert}}"; 
return directive; 
});
AngularJS applications are controlled by controllers. The ng-controller directive defines the 
application controller. A controller is a JavaScript Object, created by a standard JavaScript 
object. 
<div ng-app="" ng-controller="personController"> 
First Name: <input type="text" ng-model="person.firstName"><br> 
Last Name: <input type="text" ng-model="person.lastName"><br> 
<br> 
Full Name: {{person.firstName + " " + person.lastName}} 
</div> 
<script> 
function personController($scope) { 
$scope.person = { 
firstName: "John", 
lastName: "Doe" 
}; 
} 
</script> ct constructor.
Many general purpose services provided by AngularJS 
$http 
Used for XMLHttpRequest handling 
$location 
Provide information about the current URL 
$q 
A promise/deferred module for asynchronous requests 
$routeProvider 
Configure routes in an SPA 
$log 
Logging service 
Many more
AngularJS is built-in dependency injection mechanism. You can 
divide your application into multiple different types of 
components which AngularJS can inject into each other. 
Modularizing your application makes it easier to reuse, configure 
and test the components in your application.
Below are the core objects and component of AngularJS 
1. Value : 
A value in AngularJS is a simple object. It can be a number, 
string or JavaScript object. 
Example: 
var myModule = angular.module("myModule", []); 
myModule.value("numberValue", 999); 
myModule.value("stringValue", "abc"); 
myModule.value("objectValue", { val1 : 123, val2 : "abc"} );
2. Factory: 
Factory is a function that creates values. When a service, 
controller etc. needs a value injected from a factory, the factory 
creates the value on demand. Once created, the value is reused 
for all services, controllers etc. which need it injected. 
Example: 
var myModule = angular.module("myModule", []); 
myModule.factory("myFactory", function() 
{ return "a value"; }); 
myModule.controller("MyController", function($scope, myFactory) 
{ console.log(myFactory); });
3. Service: 
A service in AngularJS is a singleton JavaScript object which 
contains a set of functions. The functions contain whatever logic 
is necessary for the service to carry out its work. 
Example: 
function MyService() 
{ this.doIt = function() { console.log("done"); } } 
var myModule = angular.module("myModule", []); 
myModule.service("myService", MyService);
4. Providers 
Providers in AngularJS is the most flexible form of factory you 
can create. You register a provider with a module just like you do 
with a service or factory, except you use the provider() function 
instead. 
Example: 
var myModule = angular.module("myModule", []); 
myModule.provider("mySecondService", function() { var 
provider = {}; provider.$get = function() { var service = {}; 
service.doService = function() { console.log("mySecondService: 
Service Done!"); } 
return service; } 
return provider; });
var myModule = angular.module("myModule", []); 
myModule.provider("mySecondService", function() { 
var provider = {}; var config = { configParam : "default" }; 
provider.doConfig = function(configParam) { config.configParam = configParam; } 
provider.$get = function() { var service = {}; service.doService = function() { 
console.log("mySecondService: " + config.configParam); 
} 
return service; 
} 
return provider; 
}); 
myModule.config( function( mySecondServiceProvider ) { 
mySecondServiceProvider.doConfig("new config param"); 
}); myModule.controller("MyController", function($scope, mySecondService) { 
$scope.whenButtonClicked = function() { mySecondService.doIt(); 
} 
});
AngularJS routes enable you to create different URLs for different 
content in your application. 
Having different sets of URLs for different content enables the 
user to bookmark URLs to specific content, and send those URLs 
to friends etc. So such bookmarkable URL in AngularJS is called 
a route.
<!DOCTYPE html> <html lang="en"> 
<head> <title>AngularJS Routes example</title> 
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script> 
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular-route.min.js"> 
</script> 
</head> 
<body ng-app="sampleApp"> <a href="#/route1">Route 1</a><br/> 
<a href="#/route2">Route 2</a><br/> 
<div ng-view></div> <script> var module = angular.module("sampleApp", ['ngRoute']); 
module.config(['$routeProvider', function($routeProvider) 
{ $routeProvider. when('/route1', 
{ templateUrl: 'angular-route-template-1.jsp', controller: 'RouteController' }). 
when('/route2', 
{ templateUrl: 'angular-route-template-2.jsp', controller: 'RouteController' }). otherwise({ redirectTo: '/' }); 
}]); 
module.controller("RouteController", function($scope) { }) 
</script>
AngularJS has built-in support for internationalization of 
numbers and dates. In this text I will take a look at how they 
work. 
Internationalization in Filters 
{{ theDate | date: 'fullDate' }} 
{{ theValue | currency }} 
{{ theValue | number }}
<!DOCTYPE html> 
<html lang="en"> 
<head> 
<title>AngularJS Routes example</title> 
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script> 
<script src="https://code.angularjs.org/1.2.5/i18n/angular-locale_da-dk.js"> 
</script> 
</head> 
<body ng-app="myapp"> 
AngularJS I18n 
<div ng-controller="mycontroller"> 
{{theDate | date : "fullDate"}} <br/> 
{{theValue | currency }} 
</div> 
<script> var module = angular.module("myapp", []); 
module.controller("mycontroller", function($scope) { 
$scope.theDate = new Date(); 
$scope.theValue = 123.45; }); 
</script> 
</body> 
</html>
Miracle Studios Pvt. Ltd. 
Tower D, Third Floor, 
DLF Building, IT Park, 
Chandigarh, India, 160101. 
Toll Free : +91-172-5022070-99 
Fax: +91-172-4665392 
Website: www.miraclestudios.in/angular-js-development-india. 
htm
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios

More Related Content

What's hot

Understanding angular js $rootscope and $scope
Understanding angular js $rootscope and $scopeUnderstanding angular js $rootscope and $scope
Understanding angular js $rootscope and $scopeBrajesh Yadav
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular jsAayush Shrestha
 
One Weekend With AngularJS
One Weekend With AngularJSOne Weekend With AngularJS
One Weekend With AngularJSYashobanta Bai
 
Different way to share data between controllers in angular js
Different way to share data between controllers in angular jsDifferent way to share data between controllers in angular js
Different way to share data between controllers in angular jscodeandyou forums
 
Controller in AngularJS
Controller in AngularJSController in AngularJS
Controller in AngularJSBrajesh Yadav
 
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 AngularJSmurtazahaveliwala
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSDavid Parsons
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS introdizabl
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - IntroductionSagar Acharya
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSSimon Guest
 
Angular Js Get Started - Complete Course
Angular Js Get Started - Complete CourseAngular Js Get Started - Complete Course
Angular Js Get Started - Complete CourseEPAM Systems
 

What's hot (20)

Directives
DirectivesDirectives
Directives
 
Built in filters
Built in filtersBuilt in filters
Built in filters
 
Angular Js Basics
Angular Js BasicsAngular Js Basics
Angular Js Basics
 
Understanding angular js $rootscope and $scope
Understanding angular js $rootscope and $scopeUnderstanding angular js $rootscope and $scope
Understanding angular js $rootscope and $scope
 
Understanding angular js
Understanding angular jsUnderstanding angular js
Understanding angular js
 
One Weekend With AngularJS
One Weekend With AngularJSOne Weekend With AngularJS
One Weekend With AngularJS
 
AngularJS Basic Training
AngularJS Basic TrainingAngularJS Basic Training
AngularJS Basic Training
 
Different way to share data between controllers in angular js
Different way to share data between controllers in angular jsDifferent way to share data between controllers in angular js
Different way to share data between controllers in angular js
 
Angular js
Angular jsAngular js
Angular js
 
Controller in AngularJS
Controller in AngularJSController in AngularJS
Controller in AngularJS
 
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
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
AngularJS
AngularJSAngularJS
AngularJS
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS intro
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
 
The AngularJS way
The AngularJS wayThe AngularJS way
The AngularJS way
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JS
 
Angular Js Get Started - Complete Course
Angular Js Get Started - Complete CourseAngular Js Get Started - Complete Course
Angular Js Get Started - Complete Course
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
 

Similar to AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios

Similar to AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios (20)

AngularJS Mobile Warsaw 20-10-2014
AngularJS Mobile Warsaw 20-10-2014AngularJS Mobile Warsaw 20-10-2014
AngularJS Mobile Warsaw 20-10-2014
 
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
 
Custom directive and scopes
Custom directive and scopesCustom directive and scopes
Custom directive and scopes
 
Angular workshop
Angular workshopAngular workshop
Angular workshop
 
Dive into AngularJS and directives
Dive into AngularJS and directivesDive into AngularJS and directives
Dive into AngularJS and directives
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
 
Training On Angular Js
Training On Angular JsTraining On Angular Js
Training On Angular Js
 
Angular js
Angular jsAngular js
Angular js
 
Angular js
Angular jsAngular js
Angular js
 
Angular js slides
Angular js slidesAngular js slides
Angular js slides
 
AngularJs
AngularJsAngularJs
AngularJs
 
Angular js
Angular jsAngular js
Angular js
 
Starting with angular js
Starting with angular js Starting with angular js
Starting with angular js
 
The Basics Angular JS
The Basics Angular JS The Basics Angular JS
The Basics Angular JS
 
Angular directive filter and routing
Angular directive filter and routingAngular directive filter and routing
Angular directive filter and routing
 
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
 
Introduction of angular js
Introduction of angular jsIntroduction of angular js
Introduction of angular js
 
Intoduction to Angularjs
Intoduction to AngularjsIntoduction to Angularjs
Intoduction to Angularjs
 
AngularJS By Vipin
AngularJS By VipinAngularJS By Vipin
AngularJS By Vipin
 

More from Learnimtactics

Top 5 Stem Toys for 3 to 4 Year Old Kids
Top 5 Stem Toys for 3 to 4 Year Old KidsTop 5 Stem Toys for 3 to 4 Year Old Kids
Top 5 Stem Toys for 3 to 4 Year Old KidsLearnimtactics
 
Very Important Information About Nigerian Visas
Very Important Information About Nigerian VisasVery Important Information About Nigerian Visas
Very Important Information About Nigerian VisasLearnimtactics
 
Top Facts About The City of Tanzania Dar Es Salaam
Top Facts About The City of Tanzania Dar Es SalaamTop Facts About The City of Tanzania Dar Es Salaam
Top Facts About The City of Tanzania Dar Es SalaamLearnimtactics
 
Travel and Tourism StatistIcs
Travel and Tourism StatistIcsTravel and Tourism StatistIcs
Travel and Tourism StatistIcsLearnimtactics
 
How Much Can You Make As A Truck Driver
How Much Can You Make As A Truck DriverHow Much Can You Make As A Truck Driver
How Much Can You Make As A Truck DriverLearnimtactics
 
Do i need flood insurance
Do i need flood insuranceDo i need flood insurance
Do i need flood insuranceLearnimtactics
 
Travel To Nigeria or Within Nigeria Travel
Travel To Nigeria or Within Nigeria TravelTravel To Nigeria or Within Nigeria Travel
Travel To Nigeria or Within Nigeria TravelLearnimtactics
 
Top 10 Interesting Facts You Didn’t Know About Johannesburg
Top 10 Interesting Facts You Didn’t Know About JohannesburgTop 10 Interesting Facts You Didn’t Know About Johannesburg
Top 10 Interesting Facts You Didn’t Know About JohannesburgLearnimtactics
 
Interesting Facts About African Children
Interesting Facts About African ChildrenInteresting Facts About African Children
Interesting Facts About African ChildrenLearnimtactics
 
Website Design and Development Company | Website Designing Company | Web D...
Website Design and Development Company |  Website Designing Company  |  Web D...Website Design and Development Company |  Website Designing Company  |  Web D...
Website Design and Development Company | Website Designing Company | Web D...Learnimtactics
 

More from Learnimtactics (11)

Top 5 Stem Toys for 3 to 4 Year Old Kids
Top 5 Stem Toys for 3 to 4 Year Old KidsTop 5 Stem Toys for 3 to 4 Year Old Kids
Top 5 Stem Toys for 3 to 4 Year Old Kids
 
Very Important Information About Nigerian Visas
Very Important Information About Nigerian VisasVery Important Information About Nigerian Visas
Very Important Information About Nigerian Visas
 
Top Facts About The City of Tanzania Dar Es Salaam
Top Facts About The City of Tanzania Dar Es SalaamTop Facts About The City of Tanzania Dar Es Salaam
Top Facts About The City of Tanzania Dar Es Salaam
 
African Voyager Habbits
African Voyager HabbitsAfrican Voyager Habbits
African Voyager Habbits
 
Travel and Tourism StatistIcs
Travel and Tourism StatistIcsTravel and Tourism StatistIcs
Travel and Tourism StatistIcs
 
How Much Can You Make As A Truck Driver
How Much Can You Make As A Truck DriverHow Much Can You Make As A Truck Driver
How Much Can You Make As A Truck Driver
 
Do i need flood insurance
Do i need flood insuranceDo i need flood insurance
Do i need flood insurance
 
Travel To Nigeria or Within Nigeria Travel
Travel To Nigeria or Within Nigeria TravelTravel To Nigeria or Within Nigeria Travel
Travel To Nigeria or Within Nigeria Travel
 
Top 10 Interesting Facts You Didn’t Know About Johannesburg
Top 10 Interesting Facts You Didn’t Know About JohannesburgTop 10 Interesting Facts You Didn’t Know About Johannesburg
Top 10 Interesting Facts You Didn’t Know About Johannesburg
 
Interesting Facts About African Children
Interesting Facts About African ChildrenInteresting Facts About African Children
Interesting Facts About African Children
 
Website Design and Development Company | Website Designing Company | Web D...
Website Design and Development Company |  Website Designing Company  |  Web D...Website Design and Development Company |  Website Designing Company  |  Web D...
Website Design and Development Company | Website Designing Company | Web D...
 

Recently uploaded

Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)ayushiverma1100
 
9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncr9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncrthapariya601
 
Call Us ≽ 9643900018 ≼ Call Girls In Dwarka Sector 7 (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Dwarka Sector 7 (Delhi)Call Us ≽ 9643900018 ≼ Call Girls In Dwarka Sector 7 (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Dwarka Sector 7 (Delhi)ayushiverma1100
 
Call Girls In New Delhi Railway Station 9667422720 Top Quality Escorts Service
Call Girls In New Delhi Railway Station 9667422720 Top Quality Escorts ServiceCall Girls In New Delhi Railway Station 9667422720 Top Quality Escorts Service
Call Girls In New Delhi Railway Station 9667422720 Top Quality Escorts ServiceLipikasharma29
 
FULL NIGHT≼ Call girls in Janakpuri Delhi | 8377087607
FULL NIGHT≼ Call girls in Janakpuri Delhi | 8377087607FULL NIGHT≼ Call girls in Janakpuri Delhi | 8377087607
FULL NIGHT≼ Call girls in Janakpuri Delhi | 8377087607dollysharma2066
 
Call Girls In saket 9711800081 Low Rate Short 1500 Night ...
Call Girls In saket 9711800081 Low Rate Short 1500 Night ...Call Girls In saket 9711800081 Low Rate Short 1500 Night ...
Call Girls In saket 9711800081 Low Rate Short 1500 Night ...gitathapa4
 
Call Us ☎97110√14705🔝 Call Girls In Mandi House (Delhi NCR)
Call Us ☎97110√14705🔝 Call Girls In Mandi House (Delhi NCR)Call Us ☎97110√14705🔝 Call Girls In Mandi House (Delhi NCR)
Call Us ☎97110√14705🔝 Call Girls In Mandi House (Delhi NCR)thapagita
 
(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)riyaescorts54
 
Justdial Call Girls In Vaishali, Ghaziabad 8800357707 Escorts Service
Justdial Call Girls In Vaishali, Ghaziabad 8800357707 Escorts ServiceJustdial Call Girls In Vaishali, Ghaziabad 8800357707 Escorts Service
Justdial Call Girls In Vaishali, Ghaziabad 8800357707 Escorts Servicemonikaservice1
 
Tibetan Call Girls In Majnu Ka Tilla Delhi 9643097474
Tibetan Call Girls In Majnu Ka Tilla Delhi 9643097474Tibetan Call Girls In Majnu Ka Tilla Delhi 9643097474
Tibetan Call Girls In Majnu Ka Tilla Delhi 9643097474thapariya601
 
Book Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts Service
Book Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts ServiceBook Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts Service
Book Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts Servicemonikaservice1
 
9643097474 Full Enjoy @24/7 Call Girls In Moti Nagar Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Moti Nagar Delhi Ncr9643097474 Full Enjoy @24/7 Call Girls In Moti Nagar Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Moti Nagar Delhi Ncrthapariya601
 
9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncr9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncrthapariya601
 
9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncr9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncrthapariya601
 
Call Us ≽ 9643900018 ≼ Call Girls In Sarojini Nagar (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Sarojini Nagar (Delhi)Call Us ≽ 9643900018 ≼ Call Girls In Sarojini Nagar (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Sarojini Nagar (Delhi)ayushiverma1100
 
WHATSAPP CALL - 9540619990 RUSSIAN CALL GIRLS GHAZIABAD
WHATSAPP CALL - 9540619990 RUSSIAN CALL GIRLS GHAZIABADWHATSAPP CALL - 9540619990 RUSSIAN CALL GIRLS GHAZIABAD
WHATSAPP CALL - 9540619990 RUSSIAN CALL GIRLS GHAZIABADmalikasharmakk1
 
Call Girl In Malviya Nagar Delhi 9711800081 Escort Service
Call Girl In Malviya Nagar Delhi 9711800081  Escort ServiceCall Girl In Malviya Nagar Delhi 9711800081  Escort Service
Call Girl In Malviya Nagar Delhi 9711800081 Escort Servicegitathapa4
 
9643097474 Full Enjoy @24/7 Call Girls in Dwarka Mor Delhi NCR
9643097474 Full Enjoy @24/7 Call Girls in Dwarka Mor Delhi NCR9643097474 Full Enjoy @24/7 Call Girls in Dwarka Mor Delhi NCR
9643097474 Full Enjoy @24/7 Call Girls in Dwarka Mor Delhi NCRthapariya601
 
Call Us ≽ 9643900018 ≼ Call Girls In Laxmi Nagar (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Laxmi Nagar (Delhi)Call Us ≽ 9643900018 ≼ Call Girls In Laxmi Nagar (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Laxmi Nagar (Delhi)ayushiverma1100
 
▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...
▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...
▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...Lipikasharma29
 

Recently uploaded (20)

Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Lado Sarai (Delhi)
 
9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncr9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncr
 
Call Us ≽ 9643900018 ≼ Call Girls In Dwarka Sector 7 (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Dwarka Sector 7 (Delhi)Call Us ≽ 9643900018 ≼ Call Girls In Dwarka Sector 7 (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Dwarka Sector 7 (Delhi)
 
Call Girls In New Delhi Railway Station 9667422720 Top Quality Escorts Service
Call Girls In New Delhi Railway Station 9667422720 Top Quality Escorts ServiceCall Girls In New Delhi Railway Station 9667422720 Top Quality Escorts Service
Call Girls In New Delhi Railway Station 9667422720 Top Quality Escorts Service
 
FULL NIGHT≼ Call girls in Janakpuri Delhi | 8377087607
FULL NIGHT≼ Call girls in Janakpuri Delhi | 8377087607FULL NIGHT≼ Call girls in Janakpuri Delhi | 8377087607
FULL NIGHT≼ Call girls in Janakpuri Delhi | 8377087607
 
Call Girls In saket 9711800081 Low Rate Short 1500 Night ...
Call Girls In saket 9711800081 Low Rate Short 1500 Night ...Call Girls In saket 9711800081 Low Rate Short 1500 Night ...
Call Girls In saket 9711800081 Low Rate Short 1500 Night ...
 
Call Us ☎97110√14705🔝 Call Girls In Mandi House (Delhi NCR)
Call Us ☎97110√14705🔝 Call Girls In Mandi House (Delhi NCR)Call Us ☎97110√14705🔝 Call Girls In Mandi House (Delhi NCR)
Call Us ☎97110√14705🔝 Call Girls In Mandi House (Delhi NCR)
 
(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 88 (NOIDA ESCORTS)
 
Justdial Call Girls In Vaishali, Ghaziabad 8800357707 Escorts Service
Justdial Call Girls In Vaishali, Ghaziabad 8800357707 Escorts ServiceJustdial Call Girls In Vaishali, Ghaziabad 8800357707 Escorts Service
Justdial Call Girls In Vaishali, Ghaziabad 8800357707 Escorts Service
 
Tibetan Call Girls In Majnu Ka Tilla Delhi 9643097474
Tibetan Call Girls In Majnu Ka Tilla Delhi 9643097474Tibetan Call Girls In Majnu Ka Tilla Delhi 9643097474
Tibetan Call Girls In Majnu Ka Tilla Delhi 9643097474
 
Book Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts Service
Book Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts ServiceBook Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts Service
Book Call Girls In Mahipalpur Delhi 8800357707 Hot Female Escorts Service
 
9643097474 Full Enjoy @24/7 Call Girls In Moti Nagar Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Moti Nagar Delhi Ncr9643097474 Full Enjoy @24/7 Call Girls In Moti Nagar Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Moti Nagar Delhi Ncr
 
9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncr9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Laxmi Nagar Delhi Ncr
 
9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncr9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncr
9643097474 Full Enjoy @24/7 Call Girls In Munirka Delhi Ncr
 
Call Us ≽ 9643900018 ≼ Call Girls In Sarojini Nagar (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Sarojini Nagar (Delhi)Call Us ≽ 9643900018 ≼ Call Girls In Sarojini Nagar (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Sarojini Nagar (Delhi)
 
WHATSAPP CALL - 9540619990 RUSSIAN CALL GIRLS GHAZIABAD
WHATSAPP CALL - 9540619990 RUSSIAN CALL GIRLS GHAZIABADWHATSAPP CALL - 9540619990 RUSSIAN CALL GIRLS GHAZIABAD
WHATSAPP CALL - 9540619990 RUSSIAN CALL GIRLS GHAZIABAD
 
Call Girl In Malviya Nagar Delhi 9711800081 Escort Service
Call Girl In Malviya Nagar Delhi 9711800081  Escort ServiceCall Girl In Malviya Nagar Delhi 9711800081  Escort Service
Call Girl In Malviya Nagar Delhi 9711800081 Escort Service
 
9643097474 Full Enjoy @24/7 Call Girls in Dwarka Mor Delhi NCR
9643097474 Full Enjoy @24/7 Call Girls in Dwarka Mor Delhi NCR9643097474 Full Enjoy @24/7 Call Girls in Dwarka Mor Delhi NCR
9643097474 Full Enjoy @24/7 Call Girls in Dwarka Mor Delhi NCR
 
Call Us ≽ 9643900018 ≼ Call Girls In Laxmi Nagar (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Laxmi Nagar (Delhi)Call Us ≽ 9643900018 ≼ Call Girls In Laxmi Nagar (Delhi)
Call Us ≽ 9643900018 ≼ Call Girls In Laxmi Nagar (Delhi)
 
▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...
▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...
▶ ●─Hookup Call Girls In Noida Sector 137 (Noida) ⎝9667422720⎠ Delhi Female E...
 

AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios

  • 1. Manmohan Singh Internet Marketing Engg. Miracle Studios
  • 2. AngularJS is a superheroic JavaScript MVW framework. It can be added to an HTML page with a <script> tag. It extends HTML attributes with Directives, and binds data to HTML with Expressions. <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2. 15/angular.min.js"></script>
  • 3. <!DOCTYPE html> <html> <body> <div ng-app=""> <p>Name: <input type="text" ng-model="name"></p> <p ng-bind="name"></p> </div> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular. min.js"></script> </body> </html>
  • 5.  Extends HTML with directives  Model View Controller architecture  Dependency injections  Declarative two way data binding  Build with testing in mind  Dynamic templates
  • 6. At a high level, directives are markers on a DOM element such as  Attribute  Element name  Comment  CSS Class That tell AngularJS's HTML compiler to attach a specified behavior to that DOM element or even transform the DOM element and its sub elements.
  • 7. myapp = angular.module("myapp", []); myapp.directive('div', function() { var directive = {}; directive.restrict = 'E'; /* restrict this directive to elements */ directive.template = "My first directive: {{textToInsert}}"; return directive; });
  • 8. AngularJS applications are controlled by controllers. The ng-controller directive defines the application controller. A controller is a JavaScript Object, created by a standard JavaScript object. <div ng-app="" ng-controller="personController"> First Name: <input type="text" ng-model="person.firstName"><br> Last Name: <input type="text" ng-model="person.lastName"><br> <br> Full Name: {{person.firstName + " " + person.lastName}} </div> <script> function personController($scope) { $scope.person = { firstName: "John", lastName: "Doe" }; } </script> ct constructor.
  • 9. Many general purpose services provided by AngularJS $http Used for XMLHttpRequest handling $location Provide information about the current URL $q A promise/deferred module for asynchronous requests $routeProvider Configure routes in an SPA $log Logging service Many more
  • 10. AngularJS is built-in dependency injection mechanism. You can divide your application into multiple different types of components which AngularJS can inject into each other. Modularizing your application makes it easier to reuse, configure and test the components in your application.
  • 11. Below are the core objects and component of AngularJS 1. Value : A value in AngularJS is a simple object. It can be a number, string or JavaScript object. Example: var myModule = angular.module("myModule", []); myModule.value("numberValue", 999); myModule.value("stringValue", "abc"); myModule.value("objectValue", { val1 : 123, val2 : "abc"} );
  • 12. 2. Factory: Factory is a function that creates values. When a service, controller etc. needs a value injected from a factory, the factory creates the value on demand. Once created, the value is reused for all services, controllers etc. which need it injected. Example: var myModule = angular.module("myModule", []); myModule.factory("myFactory", function() { return "a value"; }); myModule.controller("MyController", function($scope, myFactory) { console.log(myFactory); });
  • 13. 3. Service: A service in AngularJS is a singleton JavaScript object which contains a set of functions. The functions contain whatever logic is necessary for the service to carry out its work. Example: function MyService() { this.doIt = function() { console.log("done"); } } var myModule = angular.module("myModule", []); myModule.service("myService", MyService);
  • 14. 4. Providers Providers in AngularJS is the most flexible form of factory you can create. You register a provider with a module just like you do with a service or factory, except you use the provider() function instead. Example: var myModule = angular.module("myModule", []); myModule.provider("mySecondService", function() { var provider = {}; provider.$get = function() { var service = {}; service.doService = function() { console.log("mySecondService: Service Done!"); } return service; } return provider; });
  • 15. var myModule = angular.module("myModule", []); myModule.provider("mySecondService", function() { var provider = {}; var config = { configParam : "default" }; provider.doConfig = function(configParam) { config.configParam = configParam; } provider.$get = function() { var service = {}; service.doService = function() { console.log("mySecondService: " + config.configParam); } return service; } return provider; }); myModule.config( function( mySecondServiceProvider ) { mySecondServiceProvider.doConfig("new config param"); }); myModule.controller("MyController", function($scope, mySecondService) { $scope.whenButtonClicked = function() { mySecondService.doIt(); } });
  • 16. AngularJS routes enable you to create different URLs for different content in your application. Having different sets of URLs for different content enables the user to bookmark URLs to specific content, and send those URLs to friends etc. So such bookmarkable URL in AngularJS is called a route.
  • 17. <!DOCTYPE html> <html lang="en"> <head> <title>AngularJS Routes example</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular-route.min.js"> </script> </head> <body ng-app="sampleApp"> <a href="#/route1">Route 1</a><br/> <a href="#/route2">Route 2</a><br/> <div ng-view></div> <script> var module = angular.module("sampleApp", ['ngRoute']); module.config(['$routeProvider', function($routeProvider) { $routeProvider. when('/route1', { templateUrl: 'angular-route-template-1.jsp', controller: 'RouteController' }). when('/route2', { templateUrl: 'angular-route-template-2.jsp', controller: 'RouteController' }). otherwise({ redirectTo: '/' }); }]); module.controller("RouteController", function($scope) { }) </script>
  • 18. AngularJS has built-in support for internationalization of numbers and dates. In this text I will take a look at how they work. Internationalization in Filters {{ theDate | date: 'fullDate' }} {{ theValue | currency }} {{ theValue | number }}
  • 19. <!DOCTYPE html> <html lang="en"> <head> <title>AngularJS Routes example</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script> <script src="https://code.angularjs.org/1.2.5/i18n/angular-locale_da-dk.js"> </script> </head> <body ng-app="myapp"> AngularJS I18n <div ng-controller="mycontroller"> {{theDate | date : "fullDate"}} <br/> {{theValue | currency }} </div> <script> var module = angular.module("myapp", []); module.controller("mycontroller", function($scope) { $scope.theDate = new Date(); $scope.theValue = 123.45; }); </script> </body> </html>
  • 20. Miracle Studios Pvt. Ltd. Tower D, Third Floor, DLF Building, IT Park, Chandigarh, India, 160101. Toll Free : +91-172-5022070-99 Fax: +91-172-4665392 Website: www.miraclestudios.in/angular-js-development-india. htm