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
AngularJS: Tipps and Tricks for $provide
Search
jowe
February 13, 2014
Programming
0
76
AngularJS: Tipps and Tricks for $provide
Donnerstagsvortrag Lightning Talk von @MJantke
jowe
February 13, 2014
Tweet
Share
More Decks by jowe
See All by jowe
AngularJS with RequireJS
jowe
1
100
Forms in AngularJS
jowe
1
120
Other Decks in Programming
See All in Programming
階層構造を表現するデータ構造とリファクタリング 〜1年で10倍成長したプロダクトの変化と課題〜
yuhisatoxxx
3
950
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
650
チームの境界をブチ抜いていけ
tokai235
0
120
高度なUI/UXこそHotwireで作ろう Kaigi on Rails 2025
naofumi
4
3.7k
Catch Up: Go Style Guide Update
andpad
0
200
ソフトウェア設計の実践的な考え方
masuda220
PRO
3
510
CSC305 Lecture 06
javiergs
PRO
0
210
複雑化したリポジトリをなんとかした話 pipenvからuvによるモノレポ構成への移行
satoshi256kbyte
1
950
monorepo の Go テストをはやくした〜い!~最小の依存解決への道のり~ / faster-testing-of-monorepos
convto
2
440
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
200
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
190
非同期jobをtransaction内で 呼ぶなよ!絶対に呼ぶなよ!
alstrocrack
0
570
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
The Art of Programming - Codeland 2020
erikaheidi
56
14k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Visualization
eitanlees
148
16k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
19
1.2k
Being A Developer After 40
akosma
91
590k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
45
2.5k
Unsuck your backbone
ammeep
671
58k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.2k
Transcript
Tipps and Tricks for $provide
@MJantke Developer bei Mayflower Marco Jantke
What is $provide? Is it this dependency injection thing?
What is $provide? ‣ API to fill DI-container ‣ Configures
the $injector ‣ Uses strategies for varying services called recipes ‣ Most functionality is exposed to angular.Module
I've got a rough image but what is this $injector
again?
What is $injector? ‣ Holds the container ‣ API to
interact with DI-container ‣ Resolves requested dependencies for services ‣ Knows how to instantiate objects and how to invoke functions
Ok, so far so good. But what do you want
to show me?
Recipes Recipes
Recipes ‣ constant() - define constant for configuration ‣ value()
- define value, get value ‣ factory() - use the module pattern ‣ service() - pass constructor, get object ‣ decorator() - intercept and extend ‣ provider() - write your configurable factory
Let's $provide \../(-.-)\../
Many thanks for your attention :-) Questions open?