Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
240
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
83
PiHome – home automation done with Raspberry PI and Python
sznapka
0
410
Big data in the trenches
sznapka
1
400
PiHome – home automation done with Raspberry PI and Python
sznapka
0
380
Domain-Driven Design in PHP
sznapka
4
2.1k
Map-Reduce patterns
sznapka
3
280
Achieving wise architecture with Symfony2 @ SPUG#5
sznapka
2
230
Smart development environments
sznapka
2
1.6k
Automated tests - facts and myths
sznapka
1
1.7k
Other Decks in Programming
See All in Programming
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
2
650
[堅牢.py #1] テストを書かない研究者に送る、最初にテストを書く実験コード入門 / Let's start your ML project by writing tests
shunk031
12
7.1k
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
160
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
380
Why Kotlin? 電子カルテを Kotlin で開発する理由 / Why Kotlin? at Henry
agatan
2
6.9k
STYLE
koic
0
150
React Native New Architecture 移行実践報告
taminif
1
150
AIコーディングエージェント(NotebookLM)
kondai24
0
170
認証・認可の基本を学ぼう前編
kouyuume
0
190
スタートアップを支える技術戦略と組織づくり
pospome
8
16k
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
370
Microservices rules: What good looks like
cer
PRO
0
1.1k
Featured
See All Featured
Context Engineering - Making Every Token Count
addyosmani
9
490
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Code Review Best Practice
trishagee
74
19k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
The Cult of Friendly URLs
andyhume
79
6.7k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.8k
We Have a Design System, Now What?
morganepeng
54
7.9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
970
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!