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
330
Other Decks in Technology
See All in Technology
『三匹の子ぶた』から学ぶネットワークセキュリティの昔と今 / Network Security: Then and Now Through the Lens of The Three Little Pigs
nttcom
1
1.6k
データ組織の転換期 一足飛びしない段階的戦略
leveragestech
PRO
0
150
最高のシステムプロンプトを作るためにフィードバック機能を導入した話
alchemy1115
1
320
Webアクセシビリティ入門 2026
recruitengineers
PRO
1
160
【CEDEC2026】『ウマ娘 プリティーダービー』 英語版のキャラクターの方言や口調をローカライズするための創造的アプローチ
cygames
PRO
1
180
モノリス Rails でも日中に rails db:migrate を走らせたい! / Daytime rails db:migrate on Monolithic Rails!
euglena1215
1
140
AIがAPIを書く時代に、私たちは何を設計すべきか
nagix
0
210
Breaking the Seal: Static Deobfuscation of Compiled V8 JavaScript Bytecode Malware
hshrzd
0
410
LLMリーダーボードアップデートに向けたAgentic Math_SWEのトレースについて
nejumi
0
210
NetBoxを利用した作業効率化の試み_NetDevNight4
tnoha
0
460
第3回しろおびセキュリティスポンサーセッション
log0417
0
140
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
230
Featured
See All Featured
The browser strikes back
jonoalderson
0
1.4k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
190
Fireside Chat
paigeccino
42
4k
The untapped power of vector embeddings
frankvandijk
2
1.8k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
270
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
260
Become a Pro
speakerdeck
PRO
31
6.1k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
240
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
We Are The Robots
honzajavorek
0
290
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