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
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
420
Angular replacements for jQuery-based libraries
teamon
2
340
Other Decks in Programming
See All in Programming
鹿野さんに聞く!『TypeScriptコードレシピ集』で磨く実践力
tonkotsuboy_com
4
1.1k
Haskell/Servantを通してWebミドルウェアを捉え直す
pizzacat83
1
480
symfony/aiとlaravel/boost
77web
0
120
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
Vite+ Unified Toolchain for the Web
naokihaba
0
740
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
160
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
8.9k
OS アップデート対応の取り組み方がもっと共有されてほしい
andpad
0
110
Claude Team Plan導入・ガイド
tk3fftk
0
170
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
0
190
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
310
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
160
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.4k
Marketing to machines
jonoalderson
1
5.6k
sira's awesome portfolio website redesign presentation
elsirapls
0
300
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.7k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
880
Chasing Engaging Ingredients in Design
codingconduct
0
230
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
290
Fireside Chat
paigeccino
42
4k
The Pragmatic Product Professional
lauravandoore
37
7.4k
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/