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
An introduction to AngularJS
Search
Wojciech Sznapka
January 17, 2014
Programming
0
250
An introduction to AngularJS
Quick introduction to AngularJS with some examples
Wojciech Sznapka
January 17, 2014
Tweet
Share
More Decks by Wojciech Sznapka
See All by Wojciech Sznapka
Getting started with Firebase in Angular
sznapka
1
96
PiHome – home automation done with Raspberry PI and Python
sznapka
0
430
Big data in the trenches
sznapka
1
410
PiHome – home automation done with Raspberry PI and Python
sznapka
0
390
Domain-Driven Design in PHP
sznapka
4
2.1k
Map-Reduce patterns
sznapka
3
300
Achieving wise architecture with Symfony2 @ SPUG#5
sznapka
2
240
Smart development environments
sznapka
2
1.6k
Automated tests - facts and myths
sznapka
1
1.7k
Other Decks in Programming
See All in Programming
grapheme_strrev関数が採択されました(あと雑感)
youkidearitai
PRO
1
200
RubyとGoでゼロから作る証券システム: 高信頼性が求められるシステムのコードの外側にある設計と運用のリアル
free_world21
0
180
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
450
Takumiから考えるSecurity_Maturity_Model.pdf
gessy0129
0
110
ご飯食べながらエージェントが開発できる。そう、Agentic Engineeringならね。
yokomachi
1
280
クライアントワークでSREをするということ。あるいは事業会社におけるSREと同じこと・違うこと
nnaka2992
1
300
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
510
オブザーバビリティ駆動開発って実際どうなの?
yohfee
3
670
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
510
モジュラモノリスにおける境界をGoのinternalパッケージで守る
magavel
0
3.4k
Claude Code、ちょっとした工夫で開発体験が変わる
tigertora7571
0
190
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
230
Featured
See All Featured
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
New Earth Scene 8
popppiees
1
1.7k
Making Projects Easy
brettharned
120
6.6k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
64
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
180
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
97
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
140
Code Review Best Practice
trishagee
74
20k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
What does AI have to do with Human Rights?
axbom
PRO
1
2k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.4k
Transcript
AngularJS Frontend Development Chapter, 17.01.2014
A.K.A. HTML6 * Powerful JavaScript MVC framework supported by Google.
* Offers minimum boilerplate for great flexibility. * Highly adopted by market. * Operating through custom HTML markup.
Bootstrap // app.html <html ng-app="findash"> </html> // app.js var findash
= angular.module('findash', ['ngResource']); //ngResource is great REST client module findash.config(function($interpolateProvider){ $interpolateProvider.startSymbol('{[').endSymbol(']}'); // to not f*ck with Twig markup });
View layer Templating, loops, filters: <tbody> <tr ng-repeat="expenditure in expenditures">
<td>{[ expenditure.name ]}</td> <td>{[ expenditure.client ]}</td> <td>{[ expenditure.amount | currency:'zł ' ]}</td> <td>{[ expenditure.created_at | date:'yyyy-MM-dd' ]}</td> </tr> </tbody>
Controller Controller code with dependency injection: findash.controller('ExpenditureList', ['$scope', '$resource', 'expendituresService',
function($scope, $resource, expendituresService) { $scope.expenditures = expendituresService.expenditures; } ]); Controller binding in template: <div ng-controller="ExpenditureList"> <table width="100%"> <tbody> <tr ng-repeat="expenditure in expenditures">
Dependency Injection findash.factory('expendituresService', ['$resource', function($resource) { var $resource = $resource;
var inst = { expenditures: [], fetch: function () { return $resource('/expenditures.json').query(); }, }; inst.expenditures = inst.fetch(); return inst; } ]);
Model Two way data binding <div ng-controller="ExpenditureCreate"> <input type="text" ng-model="expenditure.name"
name="name" placeholder="* Nazwa" required /> <button class="small button" ng-click="create(expenditure)" </div> findash.controller('ExpenditureCreate', ['$scope', '$resource', '$filter', 'expendituresService', function($scope, $resource, $filter, expendituresService) { $scope.expenditure = {} $scope.create = function(expenditure) { alert(expenditure.name); // same as inserted in input above }; } ]);
MOAR * Unit tests! * Multiple templates * Routing *
Custom directives * Animations * 3rd party modules
Wojciech Sznapka Thanks!