Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
15-437 AngularJS
Search
ThierrySans
February 09, 2016
Programming
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
15-437 AngularJS
ThierrySans
February 09, 2016
More Decks by ThierrySans
See All by ThierrySans
CSCD27 Social Engineering
thierrysans
0
280
CSCD27 Web Security
thierrysans
0
470
CSCD27 Malicious Software
thierrysans
0
420
CSCD27 Protection
thierrysans
0
530
CSCD27 System Insecurity
thierrysans
0
460
CSCD27 Human Authentication
thierrysans
0
380
CSCD27 Network security
thierrysans
0
590
CSCD27 Network (in)security
thierrysans
0
580
CSCD27 Cryptography Protocols
thierrysans
0
750
Other Decks in Programming
See All in Programming
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
230
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1.1k
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
290
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
600
最近”作らせてる” ローカルAIアプリの話
akit37
0
490
golang-bob.pdf
iwatsukayura
0
130
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
34k
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
290
GraphQL の onError と Nullability のこれから
quramy
0
150
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
200
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
140
Featured
See All Featured
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.3k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
580
WCS-LA-2024
lcolladotor
0
900
Building Better People: How to give real-time feedback that sticks.
wjessup
371
20k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
870
Designing Experiences People Love
moore
143
24k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
Transcript
AngularJS Thierry Sans
Different approaches Binding between the DOM and the javascript code
jQuery-like Using DOM selectors AngularJS Using Angular directives
Application
ng-app directive <!DOCTYPE html> <html ng-app="simpsonsApp"> <head> <script src="bower_components/angular/angular.min.js"></script> <script
src="app/simpsonsapp.js"></script> </head> ... /index.html /app/simpsonsApp.json var app = angular.module('simpsonsApp',[]);
Controller
ng-controller directive <body ng-controller="simpsonsController as simpsons"> <header> <h1>{{simpsons.title}}</h1> <div ng-click="simpsons.foo()"></div>
</header> /index.html /app/simpsonsApp.json app.controller('simpsonsController',function(){ this.data = “Hello World!”; this.foo = function(){ this.data = “The Simpsons”; }; )};
ng-show (ng-hide) directive <header> <h1>The Simpsons</h1> <div id="admin_button" ng-click="simpsons.toggle()"></div> </header>
<div id="add_simpson_form_wrapper" ng-show="simpsons.show_form"> <form class="complex_form" id="add_simpson_form"> ... </form> </div> /index.html /app/simpsonsApp.json app.controller('simpsonsController',function(){ show_form = false; this.toggle = function(){ this.show_form = ! this.show_form; }; )};
ng-repeat directive <div class="entry" ng-repeat="img in simpsons.data"> <div class=“img_box"> <img
ng-src="{{img.img_url}}" alt=“{{img.firstname}}"/> </div> <div class=“firstname”> <a href=“{{img.w_url}}">{{img.firstname}}</a> </div> <div class="down_button vote_button">{{img.down_vote}}</div> <div class="up_button vote_button">{{img.up_vote}}</div> </div> /index.html /app/simpsonsApp.json this.data = [ {"firstname": “Bart", ...}, {"firstname": “Lisa”, ...} ];
Forms
ng-model and ng-submit directive /app/simpsonsApp.json app.controller('simpsonsController',function($scope){ this.character = {}; this.add_simpson
= function(){ this.character.up_vote=0; this.character.down_vote=0; this.data.push(this.character); this.character = {}; $scope.add_simpson_form.$setPristine(); };}); <form ng-submit=“simpsons.add_simpson()”> <div class="form_title">Add a Simpson</div> <input type="name" ng-model="simpsons.character.firstname"/> <input type="url" ng-model="simpsons.character.img_url"/> <input type="url" ng-model="simpsons.character.w_url"/> <input type="submit" class="btn" value="Add"/> </form> /index.html
Ajax
$ajax /app/simpsonsApp.json app.controller('simpsonsController',function($http){ this.data = []; var controller = this;
$http.get('api/simpsons.json') .success(function(data,status){ controller.data = data; }) .error(function(error,status){ }); });
Service (Model)
Routing