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
メールのエイリアス機能を履き違えない
isshinfunada
0
230
源内ハンズオン概要編
hideg
0
140
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
540
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
240
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.7k
継続モナドとリアクティブプログラミング
yukikurage
3
700
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
240
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
440
yield再入門 #phpcon
o0h
PRO
0
980
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
310
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
150
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
230
How to build a perfect <img>
jonoalderson
1
5.9k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
400
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
740
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
490
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
650
Building Applications with DynamoDB
mza
96
7.2k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
200
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
360
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!