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
270
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
An introduction to AngularJS
Quick introduction to AngularJS with some examples
Wojciech Sznapka
January 17, 2014
More Decks by Wojciech Sznapka
See All by Wojciech Sznapka
Getting started with Firebase in Angular
sznapka
1
110
PiHome – home automation done with Raspberry PI and Python
sznapka
0
450
Big data in the trenches
sznapka
1
440
PiHome – home automation done with Raspberry PI and Python
sznapka
0
410
Domain-Driven Design in PHP
sznapka
4
2.2k
Map-Reduce patterns
sznapka
3
320
Achieving wise architecture with Symfony2 @ SPUG#5
sznapka
2
270
Smart development environments
sznapka
2
1.6k
Automated tests - facts and myths
sznapka
1
1.8k
Other Decks in Programming
See All in Programming
継続モナドとリアクティブプログラミング
yukikurage
3
670
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
140
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
200
Claude Team Plan導入・ガイド
tk3fftk
0
250
AIが無かった頃の素敵な出会いの話
codmoninc
1
330
テーブルをDELETEした
yuzneri
0
130
AI時代に設計が 最大の生産性レバーになる 意図駆動開発とデータを消さない設計|Don't Delete Your Data or Your Intent — Design as the Deepest Lever in the AI Era
tomohisa
0
130
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
150
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
190
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
240
属人化した知識を、 AIが辿れる地図にする
pkshadeck
PRO
1
130
その節約、円になってますか?
isamumumu
0
620
Featured
See All Featured
Design in an AI World
tapps
1
270
Fireside Chat
paigeccino
42
4k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
370
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
64
56k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
520
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.6k
The SEO Collaboration Effect
kristinabergwall1
1
510
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
230
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Utilizing Notion as your number one productivity tool
mfonobong
4
490
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
200
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!