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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
600
Elixir GenStage & Flow
teamon
2
1.1k
Elixir - Bydgoszcz Web Development Meetup
teamon
2
1k
Sidekiq
teamon
1
200
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
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
110
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
360
継続モナドとリアクティブプログラミング
yukikurage
3
610
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
140
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
130
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1.1k
分散システム、なんですぐ死んでしまうん?耐障害性を高めたいあなたのためのレジリエンスパターン入門
mshibuya
7
6.4k
PHP Application における Kubernetes 内 gRPC 通信
ganchiku
0
500
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.5k
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
380
えっ!!コードを読まずに開発を!?
hananouchi
0
220
ローカルLLMでどこまでコードが書けるか -縮小版 / How much code can be written on a local LLM Shortened
kishida
2
190
Featured
See All Featured
It's Worth the Effort
3n
188
29k
New Earth Scene 8
popppiees
3
2.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
290
Prompt Engineering for Job Search
mfonobong
0
380
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.6k
Exploring anti-patterns in Rails
aemeredith
3
440
A designer walks into a library…
pauljervisheath
211
24k
How Software Deployment tools have changed in the past 20 years
geshan
0
34k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
Product Roadmaps are Hard
iamctodd
55
12k
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/