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
260
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
400
Domain-Driven Design in PHP
sznapka
4
2.2k
Map-Reduce patterns
sznapka
3
310
Achieving wise architecture with Symfony2 @ SPUG#5
sznapka
2
260
Smart development environments
sznapka
2
1.6k
Automated tests - facts and myths
sznapka
1
1.7k
Other Decks in Programming
See All in Programming
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
250
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
100
Technical Debt: Understanding it Rightly, Engaging it Rightly #LaravelLiveJP
shogogg
0
210
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
860
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
170
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
150
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.3k
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
4.9k
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
A2UI という光を覗いてみる
satohjohn
1
120
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
490
運用エージェントは "作る" から "育てる" へ - 記憶と自己進化の3層設計パターン / self-evolving-agents-three-layer-agent-design
gawa
12
3.6k
Featured
See All Featured
Producing Creativity
orderedlist
PRO
348
40k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
840
The browser strikes back
jonoalderson
0
1.2k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Optimizing for Happiness
mojombo
378
71k
Building AI with AI
inesmontani
PRO
1
1.1k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
160
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Abbi's Birthday
coloredviolet
2
8k
The SEO identity crisis: Don't let AI make you average
varn
0
490
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!