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
Umbraco Festival 2013 - Introduction to AngularJS
Search
Pete Bacon Darwin
November 08, 2013
Technology
240
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Umbraco Festival 2013 - Introduction to AngularJS
Pete Bacon Darwin
November 08, 2013
More Decks by Pete Bacon Darwin
See All by Pete Bacon Darwin
Devox UK 2013 - AngularJS
petebd
2
1.6k
Directives_Presentation.pdf
petebd
5
340
Other Decks in Technology
See All in Technology
Distributed Transactions Under Fire: Building a Zero-Oversell Flash Sale Platform with Amazon Aurora DSQL
yama3133
0
100
型落ちシンクライアント端末のPoEモジュールを自作したかった話
logica0419
0
490
AI時代の「OAuth認証」にどう物申すか?(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
310
500名弱規模の組織のPythonプロジェクト(dbt) をどう管理するか?
hiracky16
0
320
APIセキュリティを組織で実現するには~注力する点と設計・実装に入れたい対策~
riiimparm
1
480
DMMブックスのNext.js化を加速させるAI活用 / Migrating DMM Books to Next.js with AI
kentarom
0
130
マイナンバーカード本人確認の実装比較(OAuth/OIDC Numa (Immersion) Workshop 2026) / 20260825 numa-12
oidfj
PRO
0
310
Digitization部 紹介資料
sansan33
PRO
2
7.7k
:syncing_time:
sksat
3
810
紙 to デジタル
ichien178
0
290
最新技術に積極チャレンジ!EKS共通基盤のこれまでとこれから
daitak
0
220
サイボウズ 開発本部採用ピッチ / Cybozu Engineer Recruit
cybozuinsideout
PRO
12
86k
Featured
See All Featured
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
550
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
How to make the Groovebox
asonas
2
2.4k
Visualization
eitanlees
152
17k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
How STYLIGHT went responsive
nonsquared
100
6.2k
The Spectacular Lies of Maps
axbom
PRO
1
950
Writing Fast Ruby
sferik
630
63k
Amusing Abliteration
ianozsvald
1
260
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Transcript
Awesome What’s all the fuss?
Pete Bacon Darwin • Computer Programmer / Dad • .NET
◦ ex-IT Consultant (Avanade / IMGROUP) ◦ Some Umbraco 4(!) • AngularJS ◦ Google Team Member ◦ Book Author ◦ AngularUI Founder Member
Jubilant JavaScript
Awesome AngularJS “What the browser would have been if it
had been created for web apps.”
Wonderful Websites http://angularjs.org http://docs.angularjs.org http://code.angularjs.org http://github.com/angular/angular.js http://stackoverflow.com/questions/tagged/angularjs
Tremendous Trending
Dynamic Data-Binding Manageable Models <input ng-model=“myName”> Creative Curlies & Fashionable
Filters {{ myBalance | currency : 2 }}
Delightful Directives Reliable Repeaters <ul> <li ng-repeat=”item in list”> {{item.name}}
</li> </ul>
Delightful Directives Essential Events <button ng-click=”makeTea()”> <div ng-keypress=”buyCatFood()”> <textarea ng-blur=”saveTheWorld()”>
Delightful Directives Vivid visuals <div ng-show=”nameCtrl.$error”>Error!!</div> <li ng-class=”{active: item.id==activeId}”> {{item.title}}
</li>
Sophisticated Structure Angular does MV-Whatever!
Sublime Scopes The glue between the Model and the View
• Every HTML element has a Scope • Views access Scope properties and methods • Scopes provide data-binding between the View and the Model
Cultured Controllers Initialize the scope with data and logic (Code
Behind) <div ng-controller=”FriendController”> <ul> <li ng-repeat=”friend in friends”> {{ friend.name }} <button ng-click=” removeFriend(friend)”>X</button> </li> </ul> <input ng-model=”newFriend”> <button ng-click=” addFriend(newFriend)”>Add</button> </div>
Constructive Controllers Controllers are just JavaScript functions appModule.controller(‘FriendController’, function($scope) {
$scope.friends = [...]; $scope.addFriend = function(newFriend) {...}; $scope.removeFriend = function(friend) {...}; });
Intelligent Injection AngularJS Injects Dependencies appModule .controller(‘ComplexController’, function($scope, $http, $timeout,
$log) { ... } );
Superb Services Services are Injectable Singleton Objects • $http: Make
an AJAX request • $log: Log to the console • $timeout: Do something later • $location: Work with the browser address
Tremendous Testability AngularJS Does Testing! • Separation of Concerns ◦
Controllers and Services can be tested independently ◦ Views are declarative • Dependency Injection ◦ Dependencies can be mocked • Testing Tools
Joyful Jasmine Behaviour Driven Development (BDD) ... ish describe ‘FriendController’,
-> beforeEach -> ... it ‘should add 3 friends to scope’, -> expect($scope.friends.length).toBe 3 afterEach -> ...
Kindhearted Karma Karma Runs Your Unit Tests in Browsers https://github.com/karma-runner/karma
karma start test-config.js --browsers=Chrome
Powerful Protractor End to End Functional Testing for AngularJS https://github.com/angular/protractor
• Protractor -> WebDriverJS -> Selenium • Simulate Interaction with your Web App
Buy The Book Packed with real solutions to real problems!
http://www.packtpub.com/angularjs-web-application-development/book