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
250
0
Share
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
100
PiHome – home automation done with Raspberry PI and Python
sznapka
0
440
Big data in the trenches
sznapka
1
420
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
250
Smart development environments
sznapka
2
1.6k
Automated tests - facts and myths
sznapka
1
1.7k
Other Decks in Programming
See All in Programming
事業会社でのセキュリティ長期インターンについて
masachikaura
0
230
モックわからないマン卒業記 ~振る舞いを起点に見直した、フロントエンドテストにおけるモックの使いどころ~
tasukuwatanabe
3
440
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
240
一度始めたらやめられない開発効率向上術 / Findy あなたのdotfilesを教えて!
k0kubun
4
2.8k
Reactive ❤️ Loom: A Forbidden Love Story
franz1981
2
220
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
1
280
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
220
VueエンジニアがReactを触って感じた_設計の違い
koukimiura
0
150
感情を設計する
ichimichi
5
730
20260315 AWSなんもわからん🥲
chiilog
2
190
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
180
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1.3k
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
160
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
The SEO Collaboration Effect
kristinabergwall1
0
410
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
The browser strikes back
jonoalderson
0
890
So, you think you're a good person
axbom
PRO
2
2k
Producing Creativity
orderedlist
PRO
348
40k
AI: The stuff that nobody shows you
jnunemaker
PRO
4
520
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
93
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!