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
Angular #6
Search
Danila Marchenkov
August 19, 2017
Programming
79
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Angular #6
Danila Marchenkov
August 19, 2017
More Decks by Danila Marchenkov
See All by Danila Marchenkov
Rxjs
sprit3dan
0
110
angular6
sprit3dan
0
80
angular5
sprit3dan
0
60
angular#4
sprit3dan
0
170
angular#3
sprit3dan
0
53
angular#2
sprit3dan
0
44
Angular#1
sprit3dan
0
73
HTML 5 Canvas
sprit3dan
0
53
Angular #5
sprit3dan
0
130
Other Decks in Programming
See All in Programming
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
140
Oxlintはいいぞ(続)
yug1224
1
550
AIエージェント時代のコードレビューを設計する
nogu66
6
2.5k
LLMは4年分のCompose移行を再現できるのか?実プロダクト279件のXMLで探る自動化の境界線
makun
0
430
新人はどこまで自力でやり、どこからAIに頼るべきか/エンジニア育成に向き合う_先輩たちの悩みと知見共有会
toppan_digital_dev
1
560
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
1
490
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
630
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
340
From 6 People Classroom Meetup to 100 People Regional Conference / FOSS4G Hiroshima 2026
furukawayasuto
0
110
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
120
新卒PdEのリアル
ryu1013
1
410
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
187
23k
Accessibility Awareness
sabderemane
1
200
The Curious Case for Waylosing
cassininazir
1
500
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
320
Facilitating Awesome Meetings
lara
57
7.1k
Making Projects Easy
brettharned
120
6.7k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
The SEO identity crisis: Don't let AI make you average
varn
0
550
The Art of Programming - Codeland 2020
erikaheidi
57
14k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.2k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
260
Transcript
AngularJS 1.5.x Marchenkov Danila, Software Developer
AngularJS DI
.config() Gets executed during the provider registrations and configuration phase.
Only providers and constants can be injected into configuration blocks.
.run() Gets executed after the injector is created and are
used to kickstart the application. Only instances and constants can be injected into run blocks
implicit annotation • ng-annotate • strict-di • $inject someModule.controller('MyController', function($scope,
greeter) {
angular.module('myApp', []) .factory('willBreak', function($rootScope) { // $rootScope is implicitly injected
}) .run(['willBreak', function(willBreak) { // AngularJS will throw when this runs }]); var MyController = function($scope, greeter) {} MyController.$inject = ['$scope', 'greeter']; someModule.controller('MyController', MyController); npm install -g ng-annotate
manual bootstrapping angular.bootstrap(document, ['myApp']);
npm install angular-animate ngAnimate
ngAnimate support
API • CSS-animations • css class hooks • ng-enter •
ng-leave • JS-animations • module.animation() api
Animation JS api myModule.animation('.slide', [function() { return { enter: function(element,
doneFn) { jQuery(element).slideIn(1000, doneFn); } } }]); .slide.ng-enter { transition:0.5s linear all; transform:translateY(-100px); } .slide.ng-enter.ng-enter-active { transform:translateY(0); } <div class="slide"> Slide in and out </div>
$animateCss myModule.animation('.slide', ['$animateCss', function($animateCss) { return { enter: function(element) {
return $animateCss(element, { event: 'enter', structural: true, addClass: 'maroon-setting', from: { height: 0 }, to: { height: 200 } }); } } }]);
$http.get(‘/some/endpoint’) .then(res => { if (!!res.data) { this.someData = res.data;
} });
npm install angular-resource ngResource
let User = $resource('/user/:userId', { userId: ’@id’ }); let user
= User.get({ userId: 123 }, () => { user.abc = true; user.$save(); });
{ 'get': { method:’GET’ }, 'save': { method:’POST' }, 'query':
{ method:'GET', isArray:true}, 'remove': { method:’DELETE' }, 'delete': { method:’DELETE' } }; var app = angular.module('app', ['ngResource', 'ngRoute']); app.factory('Notes', ['$resource', function($resource) { return $resource('/notes/:id', null, { 'update': { method:'PUT' } }); }]); app.controller('NotesCtrl', ['$scope', '$routeParams', ‘Notes', function($scope, $routeParams, Notes) { var note = Notes.get({ id: $routeParams.id }); $id = note.id; }]);
XSS
npm install angular-sanitize ng-sanitize
https://plnkr.co/edit/hFzZqLfk7beFxYXlzOlJ
$sce Strict Contextual Escaping
–Johnny Appleseed “Type a quote here.”
little more • ng-cookies • ng-messages • ng-mock • ng-touch