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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
310
Fun with Elixir Macros
teamon
1
600
Elixir GenStage & Flow
teamon
2
1.1k
Elixir - Bydgoszcz Web Development Meetup
teamon
2
1k
Sidekiq
teamon
1
210
Git - Monterail style
teamon
1
210
Rails Assets wroc_love.rb
teamon
1
810
Angular replacements for jQuery-based libraries
teamon
1
430
Angular replacements for jQuery-based libraries
teamon
2
340
Other Decks in Programming
See All in Programming
5分で問診!Composer セキュリティ健康診断
codmoninc
0
920
自動化したのに回らないテスト運用の壁ーAI時代の品質責任と生産性
mfunaki
0
130
PHP に部分適用が来るぞ!……ところで何それ?おいしいの? #phpcon / phpcon-2026
shogogg
0
600
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
Google Apps Script で Ruby を動かす
kawahara
0
140
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
460
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
310
VibeCodingからAgenticWorkflowへ
starfish719
0
340
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
630
仕様駆動開発の消費期限
watany
17
7.4k
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
210
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
180
Featured
See All Featured
It's Worth the Effort
3n
188
29k
Ethics towards AI in product and experience design
skipperchong
2
340
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
We Have a Design System, Now What?
morganepeng
55
8.3k
The Pragmatic Product Professional
lauravandoore
37
7.4k
Agile that works and the tools we love
rasmusluckow
331
22k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
430
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.3k
WCS-LA-2024
lcolladotor
0
790
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.9k
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/