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
1B+ /day規模のログを管理する技術
broadleaf
0
140
act1-costs.pdf
sumedhbala
0
230
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
330
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
110
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
150
共通化で考えるべきは、実装より公開する型だった
codeegg
0
240
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.5k
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
140
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
480
5分で問診!Composer セキュリティ健康診断
codmoninc
0
280
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
150
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
500
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
240
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
240
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Pragmatic Product Professional
lauravandoore
37
7.4k
Building Adaptive Systems
keathley
44
3.1k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
470
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
410
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
180
Context Engineering - Making Every Token Count
addyosmani
9
1k
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!