Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Angular.js
Search
Tymon Tobolski
January 28, 2013
Programming
1.5k
6
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Angular.js
Tymon Tobolski
January 28, 2013
More Decks by Tymon Tobolski
See All by Tymon Tobolski
Only possible with Elixir - ubots Case Study
teamon
0
300
Fun with Elixir Macros
teamon
1
590
Elixir GenStage & Flow
teamon
2
1.1k
Elixir - Bydgoszcz Web Development Meetup
teamon
2
990
Sidekiq
teamon
1
200
Git - Monterail style
teamon
1
210
Rails Assets wroc_love.rb
teamon
1
800
Angular replacements for jQuery-based libraries
teamon
1
420
Angular replacements for jQuery-based libraries
teamon
2
340
Other Decks in Programming
See All in Programming
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.4k
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
230
Lessons from Spec-Driven Development
simas
PRO
0
220
RTSPクライアントを自作してみた話
simotin13
0
630
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
940
act1-costs.pdf
sumedhbala
0
110
Dataformのリポジトリを立ち上げるときにまずやること / dataform-day0-2026
snhryt
0
180
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
8k
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
7k
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.5k
スマートグラスで並列バイブコーディング
hyshu
0
260
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
140
Featured
See All Featured
Making Projects Easy
brettharned
120
6.7k
We Have a Design System, Now What?
morganepeng
55
8.2k
The Curse of the Amulet
leimatthew05
2
13k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
450
Context Engineering - Making Every Token Count
addyosmani
9
980
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
170
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
The SEO Collaboration Effect
kristinabergwall1
1
490
Transcript
Wrocław, 28.01.2013
ABOUT ME Tymon Tobolski B @iteamon H teamon.eu G teamon
None
None
HTML++
HTTP = EVENT WEBAPP = STATE
ONE-WAY DATA BINDING View Template Model merge
BACKBONE & FRIENDS View Template Model View Template Router Model
Model
BINDING MESS View Model Template
EVENT HANDLING class MyView extends Backbone.View events: "click #my-button": "handler"
handler: (e) => alert("Click!")
EVENT HANDLING $("#my-button").click (e) => alert("Click!")
ONE-WAY DATA BINDING View Template Model merge ?
TWO-WAY DATA BINDING View Template Model compile instant update
<!doctype html> <html ng-app> <head> <script src="angular.js"></script> </head> <body> <div>
<input type="text" ng-model="name"/> <span>Hello {{ name }}!</span> </div> </body> </html>
Controllers business logic Directives DOM manipulation Filters output manipulation Services
external dependencies ARCHITECTURE
app = angular.module('myapp', []) app.controller 'ItemsCtrl', ($scope) -> $scope.items =
[ {name: "Item A"} {name: "Item B"} ] $scope.newName = "" $scope.add = () -> $scope.items.push({name: $scope.newName}) $scope.newName = "" angular.bootstrap(document, ['myapp']) <div ng-controller="ItemsCtrl"> <li ng-repeat="item in items"> {{ item.name }} </li> <input type="text" ng-model="newName"/> <button ng-click="add()">+</button> </div> http://plnkr.co/edit/koQ2iu4wLTosQxZbh6KT
app = angular.module('myapp', []) app.controller 'ItemsCtrl', ($scope) -> $scope.items =
[ {name: "Item A"} {name: "Item B"} ] $scope.newName = "" $scope.add = () -> $scope.items.push({name: $scope.newName}) $scope.newName = "" angular.bootstrap(document, ['myapp']) <div ng-controller="ItemsCtrl"> <li ng-repeat="item in items"> {{ item.name }} </li> <input type="text" ng-model="newName"/> <button ng-click="add()">+</button> </div> http://plnkr.co/edit/koQ2iu4wLTosQxZbh6KT
None
DIRECTIVES user “events” ng-click ng-change ng-submit ng-mouse* state reflection ng-hide
ng-model ng-repeat ng-style
DIRECTIVES angular-ui.github.com <input ng-model="date" ui-date/>
DIRECTIVES angular-ui.github.com <input ng-model="date" ui-date/> custom UI directive
FILTERS $scope.value = 20000 <span>{{ value | currency }}</span>
FILTERS $scope.value = 20000 <span>{{ value | currency }}</span> filter
FILTERS currency date json lowercase uppercase number orderBy
SERVICES $http $resource REST $locale i18n $location $q Promise $scope
$routeParams
ROUTING app.config ($routeProvider) -> $routeProvider. when('/', {controller: IndexCtrl, templateUrl: 'index.html'}).
when('/edit/:id', {controller: EditCtrl, templateUrl: 'edit.html'}). when('/new', {controller: NewCtrl, templateUrl: 'new.html'}). otherwise({redirectTo:'/'})
$scope.items = Item.query() CALLBACK ARE BAD Promise (deffered) http://docs.angularjs.org/api/ng.$q
Questions? k
RESOURCES HOMEPAGE http://angularjs.org CONCEPTUAL MUST READ: http://docs.angularjs.org/guide/concepts TUTORIAL: http://docs.angularjs.org/tutorial/