SlideShare a Scribd company logo
AngularJS
Jason
Agenda
• What is AngularJS
• AngularJS Features
• Directives、Filters and Data Binding
• Views、Controllers and Scope
• Modules and Factories
SPA
• Single Page Application
• In which we have a shell page and we can load multiple views into that.
• The Challenge with SPAs
• DOM Manipulation、Caching、Data Binding…etc.
AngularJS
• AngularJS is one core library.
• AngularJS is a structural framework for dynamic web apps
• AngularJS is a full-featured SPA framework
AngularJS
AngularJs
• Angular takes another approach.
• Data binding, as in {{}}.
• DOM control structures for repeating/hiding DOM fragments.
• Support for forms and form validation.
• Attaching code-behind to DOM elements.
• Grouping of HTML into reusable components.
Directives
• A directive is really a way to teach HTML new tricks.
• At a high level, directives are markers on a DOM element (such as an attribute,
element name, comment or CSS class) that tell AngularJS's HTML compiler ($compile)
to attach a specified behavior to that DOM element or even transform the DOM
element and its children.
Using Directives and DataBinding Syntax
<!DOCTYPE html>
<html ng-app>
<head>
<script src="angular.min.js"></script>
<title></title>
</head>
<body>
Name:<input type=“text” ng-model=“name” /> {{ name}}
<p ng-bind="name"></p>
</body>
</html>
Directive
Directive
Data Binding Expression
Directive
Matching Directives
• Any time you see ng- that is an Angular directive
• The normalization process is as follows:
• Strip 「x-」 and 「data-」 from the front of the element/attributes.
• Convert the「 :」 ,「 -」 , or「 _」 delimited name to camelCase.
• Example
• <input type="text" ng-model="name" />
• <input type="text" data-ng-model="name" />
• <input type="text" ng:model="name" />
• <input type="text" ng_model="name" />
Directives
• ng-app directive
• Use this directive to auto-bootstrap an AngularJS application.
• ng-bind directive
• The ngBind attribute tells Angular to replace the text content of the specified HTML
element with the value of a given expression, and to update the text content when the
value of that expression changes.
• ng-model directive
• The ngModel directive binds an input,select, textarea (or custom form control) to a
property on the scope using NgModelController, which is created and exposed by this
directive.
Angular Expressions
• Angular expressions are JavaScript-like code snippets that are usually
placed in bindings such as {{ expression }}.
• For example, these are valid expressions in Angular:
• 1+2
• a+b
• user.name
• Items[index]
Lterating with the ng-repeat Directive
<div data-ng-init="names=['John Smith', 'John Doe', 'Jane Doe']">
<ul>
<li data-ng-repeat="name in names">
{{name}}
</li>
</ul>
</div>
Using Filters
<input type="text" data-ng-model="nameText" />
<div data-ng-init="names=['John Smith', '1John Doe', 'Jane Doe']">
<ul>
<li data-ng-repeat="name in names | filter:nameText">
{{name | uppercase}}
</li>
</ul>
</div>
Understanding Angular Filters
{{ 99 * 99 | number}}
{{ 9999 + 1 | number:2 }}
{{ 99 * 99 | currency}}
{{ 99 * 99 | currency: 'NT$'}}
{{'Hello World' | uppercase}}
{{'Hello World' | lowercase}}
{{ 1393300831 | date: 'medium'}}
{{ 1393300831 | date: 'yyyy-MM-dd'}}
{{ obj | json}}
Understanding Angular Filters
• Format Conver Data Filter
• currency custom filter
• number limiTo
• date orderBy
• lowercase
• uppercase
• json
View, Controllers and Scope
View Controller$scope
$scope is the "glue"(ViewModel) between a controller and a view
Understanding Controllers
• In Angular, a Controller is a JavaScript constructor function that is used to
augment the Angular Scope
• When a Controller is attached to the DOM via the ng-controller directive, Angular
will instantiate a new Controller object, using the specified Controller's constructor
function.
• A new child scope will be available as an injectable parameter to the Controller's
constructor function as $scope.
Creating aView and Controller
<div class="container" data-ng-controller="SimpleController">
<h3>Adding a Simple Controller</h3>
<input type="text" data-ng-model="name" />
<ul>
<li data-ng-repeat="cust in customers">
{{ cust.name }} - {{ cust.city}}
</li>
</ul>
</div>
<script>
function SimpleController($scope)
{
$scope.customers = [
{name : 'Dave Jones', city:'Phoenix'},
{name : 'Jamie Riley', city:'Atlanta'},
{name : 'Heedy Wahlin', city:'Chandler'},
{name : 'Thomas Winter', city:'Seattle'},
];
}
</script>
So now we have two properties in the scope.The ng-model is going to add a property in the scope
called name, and we can actually get to that now in the controller by saying $scope.name
Access $scope
Basic controller
Create a Controller in a Module
Module that demoApp
depends on
var demoApp = angular.module('demoApp', []);
demoApp.controller('SimpleController', function($scope) {
$scope.customers = [
{name : 'Dave Jones', city:'Phoenix'},
{name : 'Jamie Riley', city:'Atlanta'},
{name : 'Heedy Wahlin', city:'Chandler'},
{name : 'Thomas Winter', city:'Seattle'}
];
});
Create a Controller in a Module
var demoApp = angular.module('demoApp', []);
demoApp.controller('SimpleController', ['$scope', function(scope){
scope.customers = [
{name : 'Dave Jones', city:'Phoenix'},
{name : 'Jamie Riley', city:'Atlanta'},
{name : 'Heedy Wahlin', city:'Chandler'},
{name : 'Thomas Winter', city:'Seattle'}
];
}]);
Create Multi Controller in a Module
var demoApp = angular.module('demoApp', []);
var controllers = {};
controllers.SimpleController = function($scope) {
……
};
controllers.SimpleController2 = function($scope) {
……
};
demoApp.controller(controllers);
The Role of Factories
var demoApp = angular.module('demoApp', [])
.factory('simpleFactory', function(){
var factory = {};
var customers = [………];
factory.getCustomers = function(){
return customers;
};
return factory;
}).controller('SimpleController', function($scope, simpleFactory)
{
$scope.customers = simpleFactory.getCustomers();
});
Factory injected into
controller at runtime
Create Custom Directive
angular.module('docsSimpleDirective', []).controller('Controller', function($scope) {
$scope.customer = {
name: 'Naomi',
address: '1600 Amphitheatre'
};
}).directive('myCustomer', function() {
return {
restrict: 'A',
template: 'Name: {{customer.name}} Address: {{customer.address}}'
};
});
<div ng-controller="Controller">
<div my-customer></div>
</div>
$inject
• If a function has an $inject property and its value is an array of strings, then
the strings represent names of services to be injected into the function.
var MyController = function(renamed$scope, renamedGreeter) {
...
}
MyController['$inject'] = ['$scope', 'greeter'];
ValueVS. ServiceVS. FactoryVS. Provider
• Value
• module.value('valueName', valueObj);
• Get value from valueObj
• Service
• module.service( 'serviceName', ServiceFunction );
• Get service from 'new ServiceFunction()'.
• Factory
• module.factory( 'factoryName', FactoryFunction );
• Get factory from the value that is returned by invoking the FactoryFunction.
• Provider
• module.provider( 'providerName', ProviderFunction);
• Get provider from new ProviderFunction().$get()
$watch
• $watch(watchExpression, listener, [objectEquality])
• Registers a listener callback to be executed whenever the watchExpression changes
• $watchCollection(watchExpression, listener)
• Shallow watches the properties of an object and fires whenever any of the properties
change
Reference
• AngularJS In 60 Minutes
• http://fastandfluid.com/publicdownloads/AngularJSIn60MinutesIsh_DanWahlin_May2
013.pdf
• AngularJS
• https://angularjs.org/

More Related Content

What's hot (20)

PPTX
Practical AngularJS
Wei Ru
 
ODP
AngularJs Crash Course
Keith Bloomfield
 
PPTX
AngularJS in 60ish Minutes
Dan Wahlin
 
PPTX
Basics of AngularJS
Filip Janevski
 
PDF
준비하세요 Angular js 2.0
Jeado Ko
 
DOCX
Filters in AngularJS
Brajesh Yadav
 
PDF
Ultimate Introduction To AngularJS
Jacopo Nardiello
 
PDF
Domain Driven Design and Hexagonal Architecture with Rails
Declan Whelan
 
PPTX
AngularJS for Java Developers
Loc Nguyen
 
PPTX
AngularJS
LearningTech
 
PPTX
AngularJs $provide API internals & circular dependency problem.
Yan Yankowski
 
PDF
Angular js 2.0, ng poznań 20.11
Kamil Augustynowicz
 
PPTX
Jquery Complete Presentation along with Javascript Basics
EPAM Systems
 
PPTX
AngularJS.part1
Andrey Kolodnitsky
 
PPTX
AngularJS Internal
Eyal Vardi
 
PDF
AngularJS Basics and Best Practices - CC FE &UX
JWORKS powered by Ordina
 
PDF
Get AngularJS Started!
Dzmitry Ivashutsin
 
PDF
Workshop 12: AngularJS Parte I
Visual Engineering
 
PDF
Difference between java script and jquery
Umar Ali
 
PPTX
React & redux
Cédric Hartland
 
Practical AngularJS
Wei Ru
 
AngularJs Crash Course
Keith Bloomfield
 
AngularJS in 60ish Minutes
Dan Wahlin
 
Basics of AngularJS
Filip Janevski
 
준비하세요 Angular js 2.0
Jeado Ko
 
Filters in AngularJS
Brajesh Yadav
 
Ultimate Introduction To AngularJS
Jacopo Nardiello
 
Domain Driven Design and Hexagonal Architecture with Rails
Declan Whelan
 
AngularJS for Java Developers
Loc Nguyen
 
AngularJS
LearningTech
 
AngularJs $provide API internals & circular dependency problem.
Yan Yankowski
 
Angular js 2.0, ng poznań 20.11
Kamil Augustynowicz
 
Jquery Complete Presentation along with Javascript Basics
EPAM Systems
 
AngularJS.part1
Andrey Kolodnitsky
 
AngularJS Internal
Eyal Vardi
 
AngularJS Basics and Best Practices - CC FE &UX
JWORKS powered by Ordina
 
Get AngularJS Started!
Dzmitry Ivashutsin
 
Workshop 12: AngularJS Parte I
Visual Engineering
 
Difference between java script and jquery
Umar Ali
 
React & redux
Cédric Hartland
 

Viewers also liked (19)

PPTX
Vic weekly learning_20160325
LearningTech
 
PPTX
Angular
LearningTech
 
PPTX
20150515ken
LearningTech
 
PDF
James elastic search
LearningTech
 
PPTX
Knockout
LearningTech
 
PPTX
What's new in c# 6.0
LearningTech
 
PPTX
Peggy 重新認識java script
LearningTech
 
PPTX
Ken20150313
LearningTech
 
PPTX
20150213 linq pad_tips
LearningTech
 
PPT
Ken20150320
LearningTech
 
PPTX
Html, CSS, Javascript, Jquery, Meteor應用
LearningTech
 
PDF
Lodash js
LearningTech
 
PPTX
20141107 node js_eventemitterpattern_anney
LearningTech
 
PPTX
Semantic ui
LearningTech
 
PPTX
SQL 效能調校
LearningTech
 
PPTX
Process control nodejs
LearningTech
 
PPTX
Express Web Application Framework
LearningTech
 
PPTX
An overview of java script in 2015 (ecma script 6)
LearningTech
 
PPTX
node.js errors
LearningTech
 
Vic weekly learning_20160325
LearningTech
 
Angular
LearningTech
 
20150515ken
LearningTech
 
James elastic search
LearningTech
 
Knockout
LearningTech
 
What's new in c# 6.0
LearningTech
 
Peggy 重新認識java script
LearningTech
 
Ken20150313
LearningTech
 
20150213 linq pad_tips
LearningTech
 
Ken20150320
LearningTech
 
Html, CSS, Javascript, Jquery, Meteor應用
LearningTech
 
Lodash js
LearningTech
 
20141107 node js_eventemitterpattern_anney
LearningTech
 
Semantic ui
LearningTech
 
SQL 效能調校
LearningTech
 
Process control nodejs
LearningTech
 
Express Web Application Framework
LearningTech
 
An overview of java script in 2015 (ecma script 6)
LearningTech
 
node.js errors
LearningTech
 
Ad

Similar to Angular (20)

PDF
Angular.js Primer in Aalto University
SC5.io
 
DOCX
Angular js
prasaddammalapati
 
PPTX
Valentine with AngularJS
Vidyasagar Machupalli
 
PPTX
Front end development with Angular JS
Bipin
 
PPTX
Angular workshop - Full Development Guide
Nitin Giri
 
PPTX
01 startoff angularjs
Erhwen Kuo
 
PPTX
ANGULARJS introduction components services and directives
SanthoshB77
 
PDF
AngularJS in 60ish Minutes - Dan Wahlin | FalafelCON 2014
FalafelSoftware
 
PPTX
Angular js
vu van quyet
 
PPTX
Angular js PPT
Imtiyaz Ahmad Khan
 
PPTX
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
Learnimtactics
 
PDF
Dive into AngularJS and directives
Tricode (part of Dept)
 
PPTX
Angular Presentation
Adam Moore
 
PPTX
Angular js
ParmarAnisha
 
PDF
Wt unit 5 client &amp; server side framework
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
PPTX
Introduction to AngularJs
murtazahaveliwala
 
PPTX
AngularJs Workshop SDP December 28th 2014
Ran Wahle
 
PPTX
angularJs Workshop
Ran Wahle
 
PPTX
Angular Workshop_Sarajevo2
Christoffer Noring
 
PDF
Introduction to AngularJS
Jussi Pohjolainen
 
Angular.js Primer in Aalto University
SC5.io
 
Angular js
prasaddammalapati
 
Valentine with AngularJS
Vidyasagar Machupalli
 
Front end development with Angular JS
Bipin
 
Angular workshop - Full Development Guide
Nitin Giri
 
01 startoff angularjs
Erhwen Kuo
 
ANGULARJS introduction components services and directives
SanthoshB77
 
AngularJS in 60ish Minutes - Dan Wahlin | FalafelCON 2014
FalafelSoftware
 
Angular js
vu van quyet
 
Angular js PPT
Imtiyaz Ahmad Khan
 
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
Learnimtactics
 
Dive into AngularJS and directives
Tricode (part of Dept)
 
Angular Presentation
Adam Moore
 
Angular js
ParmarAnisha
 
Wt unit 5 client &amp; server side framework
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
Introduction to AngularJs
murtazahaveliwala
 
AngularJs Workshop SDP December 28th 2014
Ran Wahle
 
angularJs Workshop
Ran Wahle
 
Angular Workshop_Sarajevo2
Christoffer Noring
 
Introduction to AngularJS
Jussi Pohjolainen
 
Ad

More from LearningTech (20)

PPTX
vim
LearningTech
 
PPTX
PostCss
LearningTech
 
PPTX
ReactJs
LearningTech
 
PPTX
Docker
LearningTech
 
PPTX
Expression tree
LearningTech
 
PPTX
flexbox report
LearningTech
 
PPTX
Vic weekly learning_20160504
LearningTech
 
PPTX
Reflection &amp; activator
LearningTech
 
PPTX
Peggy markdown
LearningTech
 
PPTX
Node child process
LearningTech
 
PPTX
20160415ken.lee
LearningTech
 
PPTX
Peggy elasticsearch應用
LearningTech
 
PPTX
Expression tree
LearningTech
 
PPTX
D3js learning tips
LearningTech
 
PPTX
git command
LearningTech
 
PDF
Asp.net MVC DI
LearningTech
 
PPTX
Vic weekly learning_20151127
LearningTech
 
PPTX
Mocha.js
LearningTech
 
PPTX
R language
LearningTech
 
PPTX
20151120 ian cocos2d js
LearningTech
 
PostCss
LearningTech
 
ReactJs
LearningTech
 
Docker
LearningTech
 
Expression tree
LearningTech
 
flexbox report
LearningTech
 
Vic weekly learning_20160504
LearningTech
 
Reflection &amp; activator
LearningTech
 
Peggy markdown
LearningTech
 
Node child process
LearningTech
 
20160415ken.lee
LearningTech
 
Peggy elasticsearch應用
LearningTech
 
Expression tree
LearningTech
 
D3js learning tips
LearningTech
 
git command
LearningTech
 
Asp.net MVC DI
LearningTech
 
Vic weekly learning_20151127
LearningTech
 
Mocha.js
LearningTech
 
R language
LearningTech
 
20151120 ian cocos2d js
LearningTech
 

Angular

  • 2. Agenda • What is AngularJS • AngularJS Features • Directives、Filters and Data Binding • Views、Controllers and Scope • Modules and Factories
  • 3. SPA • Single Page Application • In which we have a shell page and we can load multiple views into that. • The Challenge with SPAs • DOM Manipulation、Caching、Data Binding…etc.
  • 4. AngularJS • AngularJS is one core library. • AngularJS is a structural framework for dynamic web apps • AngularJS is a full-featured SPA framework
  • 6. AngularJs • Angular takes another approach. • Data binding, as in {{}}. • DOM control structures for repeating/hiding DOM fragments. • Support for forms and form validation. • Attaching code-behind to DOM elements. • Grouping of HTML into reusable components.
  • 7. Directives • A directive is really a way to teach HTML new tricks. • At a high level, directives are markers on a DOM element (such as an attribute, element name, comment or CSS class) that tell AngularJS's HTML compiler ($compile) to attach a specified behavior to that DOM element or even transform the DOM element and its children.
  • 8. Using Directives and DataBinding Syntax <!DOCTYPE html> <html ng-app> <head> <script src="angular.min.js"></script> <title></title> </head> <body> Name:<input type=“text” ng-model=“name” /> {{ name}} <p ng-bind="name"></p> </body> </html> Directive Directive Data Binding Expression Directive
  • 9. Matching Directives • Any time you see ng- that is an Angular directive • The normalization process is as follows: • Strip 「x-」 and 「data-」 from the front of the element/attributes. • Convert the「 :」 ,「 -」 , or「 _」 delimited name to camelCase. • Example • <input type="text" ng-model="name" /> • <input type="text" data-ng-model="name" /> • <input type="text" ng:model="name" /> • <input type="text" ng_model="name" />
  • 10. Directives • ng-app directive • Use this directive to auto-bootstrap an AngularJS application. • ng-bind directive • The ngBind attribute tells Angular to replace the text content of the specified HTML element with the value of a given expression, and to update the text content when the value of that expression changes. • ng-model directive • The ngModel directive binds an input,select, textarea (or custom form control) to a property on the scope using NgModelController, which is created and exposed by this directive.
  • 11. Angular Expressions • Angular expressions are JavaScript-like code snippets that are usually placed in bindings such as {{ expression }}. • For example, these are valid expressions in Angular: • 1+2 • a+b • user.name • Items[index]
  • 12. Lterating with the ng-repeat Directive <div data-ng-init="names=['John Smith', 'John Doe', 'Jane Doe']"> <ul> <li data-ng-repeat="name in names"> {{name}} </li> </ul> </div>
  • 13. Using Filters <input type="text" data-ng-model="nameText" /> <div data-ng-init="names=['John Smith', '1John Doe', 'Jane Doe']"> <ul> <li data-ng-repeat="name in names | filter:nameText"> {{name | uppercase}} </li> </ul> </div>
  • 14. Understanding Angular Filters {{ 99 * 99 | number}} {{ 9999 + 1 | number:2 }} {{ 99 * 99 | currency}} {{ 99 * 99 | currency: 'NT$'}} {{'Hello World' | uppercase}} {{'Hello World' | lowercase}} {{ 1393300831 | date: 'medium'}} {{ 1393300831 | date: 'yyyy-MM-dd'}} {{ obj | json}}
  • 15. Understanding Angular Filters • Format Conver Data Filter • currency custom filter • number limiTo • date orderBy • lowercase • uppercase • json
  • 16. View, Controllers and Scope View Controller$scope $scope is the "glue"(ViewModel) between a controller and a view
  • 17. Understanding Controllers • In Angular, a Controller is a JavaScript constructor function that is used to augment the Angular Scope • When a Controller is attached to the DOM via the ng-controller directive, Angular will instantiate a new Controller object, using the specified Controller's constructor function. • A new child scope will be available as an injectable parameter to the Controller's constructor function as $scope.
  • 18. Creating aView and Controller <div class="container" data-ng-controller="SimpleController"> <h3>Adding a Simple Controller</h3> <input type="text" data-ng-model="name" /> <ul> <li data-ng-repeat="cust in customers"> {{ cust.name }} - {{ cust.city}} </li> </ul> </div> <script> function SimpleController($scope) { $scope.customers = [ {name : 'Dave Jones', city:'Phoenix'}, {name : 'Jamie Riley', city:'Atlanta'}, {name : 'Heedy Wahlin', city:'Chandler'}, {name : 'Thomas Winter', city:'Seattle'}, ]; } </script> So now we have two properties in the scope.The ng-model is going to add a property in the scope called name, and we can actually get to that now in the controller by saying $scope.name Access $scope Basic controller
  • 19. Create a Controller in a Module Module that demoApp depends on var demoApp = angular.module('demoApp', []); demoApp.controller('SimpleController', function($scope) { $scope.customers = [ {name : 'Dave Jones', city:'Phoenix'}, {name : 'Jamie Riley', city:'Atlanta'}, {name : 'Heedy Wahlin', city:'Chandler'}, {name : 'Thomas Winter', city:'Seattle'} ]; });
  • 20. Create a Controller in a Module var demoApp = angular.module('demoApp', []); demoApp.controller('SimpleController', ['$scope', function(scope){ scope.customers = [ {name : 'Dave Jones', city:'Phoenix'}, {name : 'Jamie Riley', city:'Atlanta'}, {name : 'Heedy Wahlin', city:'Chandler'}, {name : 'Thomas Winter', city:'Seattle'} ]; }]);
  • 21. Create Multi Controller in a Module var demoApp = angular.module('demoApp', []); var controllers = {}; controllers.SimpleController = function($scope) { …… }; controllers.SimpleController2 = function($scope) { …… }; demoApp.controller(controllers);
  • 22. The Role of Factories var demoApp = angular.module('demoApp', []) .factory('simpleFactory', function(){ var factory = {}; var customers = [………]; factory.getCustomers = function(){ return customers; }; return factory; }).controller('SimpleController', function($scope, simpleFactory) { $scope.customers = simpleFactory.getCustomers(); }); Factory injected into controller at runtime
  • 23. Create Custom Directive angular.module('docsSimpleDirective', []).controller('Controller', function($scope) { $scope.customer = { name: 'Naomi', address: '1600 Amphitheatre' }; }).directive('myCustomer', function() { return { restrict: 'A', template: 'Name: {{customer.name}} Address: {{customer.address}}' }; }); <div ng-controller="Controller"> <div my-customer></div> </div>
  • 24. $inject • If a function has an $inject property and its value is an array of strings, then the strings represent names of services to be injected into the function. var MyController = function(renamed$scope, renamedGreeter) { ... } MyController['$inject'] = ['$scope', 'greeter'];
  • 25. ValueVS. ServiceVS. FactoryVS. Provider • Value • module.value('valueName', valueObj); • Get value from valueObj • Service • module.service( 'serviceName', ServiceFunction ); • Get service from 'new ServiceFunction()'. • Factory • module.factory( 'factoryName', FactoryFunction ); • Get factory from the value that is returned by invoking the FactoryFunction. • Provider • module.provider( 'providerName', ProviderFunction); • Get provider from new ProviderFunction().$get()
  • 26. $watch • $watch(watchExpression, listener, [objectEquality]) • Registers a listener callback to be executed whenever the watchExpression changes • $watchCollection(watchExpression, listener) • Shallow watches the properties of an object and fires whenever any of the properties change
  • 27. Reference • AngularJS In 60 Minutes • http://fastandfluid.com/publicdownloads/AngularJSIn60MinutesIsh_DanWahlin_May2 013.pdf • AngularJS • https://angularjs.org/

Editor's Notes

  • #25: minify http://jsbin.com/musiqo/edit?html,js,output
  • #26: http://jsbin.com/lazila/edit
  • #27: http://jsbin.com/fusefepama/edit http://bennadel.github.io/JavaScript-Demos/demos/watch-vs-watch-collection/