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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
徹底討論!ECS vs EKS!
daitak
3
1.7k
感情と身体を置き去りにしない、エンジニアの生きのこり方 ──いまから、ここから「自分の状態」を扱うという選択
saorimurooka
0
330
アジャイルな経理と Claude Code と経営の未来
kawaguti
PRO
3
190
5分でわかるDuckDB Quack
chanyou0311
2
250
WebGIS AI Agentの紹介
_shimizu
0
550
SteampipeとExcel Power QueryでAWS構成定義書の作成を自動化する
jhashimoto
0
180
脱SaaS!FDEを支えるプロビジョニングと分離設計
knih
0
300
Flow 不死:AI 時代 DevOps 的不變本質
cheng_wei_chen
2
500
從開發到部署全都交給 AI:實作 AI 驅動的自動化流程
appleboy
0
160
SONiC Scale-Up Working Group から探る Scale-UpやUltraEthernet機能の実装方法
ebiken
PRO
2
480
AIが自律的に回る開発ループを設計してチーム開発に組み込む
nekorush14
0
120
AIに障害切り分けを全部やってもらった。 。 。 。
estie
0
110
Featured
See All Featured
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
A better future with KSS
kneath
240
18k
Building Adaptive Systems
keathley
44
3.1k
Everyday Curiosity
cassininazir
0
240
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
250
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Between Models and Reality
mayunak
4
350
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
610
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
540
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.2k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
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