Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
AngularJS 1.3にBrowserify組み合わせてイベント駆動にした話
Search
OKUNOKENTARO
March 21, 2015
Programming
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AngularJS 1.3にBrowserify組み合わせてイベント駆動にした話
ng-japan 2015年3月21日発表分の資料をSlideShareより再掲。
http://www.slideshare.net/armorik83/ng-japan
OKUNOKENTARO
March 21, 2015
More Decks by OKUNOKENTARO
See All by OKUNOKENTARO
トレタO/X アーキテクチャ移行記 Next.js App Router化への道のり / TORETA TECH UPDATE 1
okunokentaro
5
12k
Podcastを継続する技術 / refactoradio-240119
okunokentaro
1
230
Webアプリケーション設計の第一歩は ディレクトリの整理から / Encraft 1
okunokentaro
33
10k
JSONとJSON Schemaを改めて理解する / tokyo_study
okunokentaro
9
2.5k
それでもどうしてRecoilを使うのか / Harajuku.ts Meetup Recoil
okunokentaro
19
5.7k
TypeScriptは10年でこんなに進化しました / TechFeed Experts Night 11
okunokentaro
6
1.8k
Hasura.io RDBをサクサク作る方法はARやO/RMだけじゃなくなりました/hasura-io
okunokentaro
5
730
コードには型アノテーションよりも要件アノテーションを増やせ!/harajukuts2
okunokentaro
14
6.6k
10年と3ヶ月でWebサービスを作った話 / Piyogrammer Conference 2021
okunokentaro
2
1.1k
Other Decks in Programming
See All in Programming
Intent as Code
shoppingjaws
6
1.1k
Jetpack Compose メカニズム
skydoves
0
470
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
3.1k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
290
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
250
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
270
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
4
750
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
5
4.3k
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
4.9k
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
170
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
200
SREの越境 / SRE Collaboration
y0hgi
2
270
Featured
See All Featured
The Cult of Friendly URLs
andyhume
79
7k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
520
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
We Have a Design System, Now What?
morganepeng
55
8.3k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
530
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
The Language of Interfaces
destraynor
162
27k
Deep Space Network (abreviated)
tonyrice
0
320
The Limits of Empathy - UXLibs8
cassininazir
1
690
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Transcript
1.3にBrowserify組み合わせて イベント駆動にした話 ng-japan March 21, 2015
@armorik83 • ژ͔Βདྷ·ͨ͠ from Kyoto. • AngularJS Anti-patterns Ξϯνύλʔϯू •
Modern AngularJS etc.
1.4.0-beta.5 1.3.12 by own project var angular = require('angular'); console.log(angular.version);
var angular = require('angular'); console.log(angular.version); 1.4.0-beta.5 ^1.3.14 2015-02-24 !!??
Already supported • 1.3ͰBrowserifyͬͨ͠Α͏ͱ ࢥͬͨΒɺ͏ରԠͯ͠·ͨ͠ • browserify-shim is useful when
you use <=1.3.13 thlorenz/browserify-shim
Use only directive • Each .ts file has one directive
• Towards 2.0, I DON'T use service, factory, ng-controller
Isolate Scope & broadcast • Use only Directive's isolate scope
• Use only $broadcast() • But event names scattered Πϕϯτ໊จࣈྻ͕ࢄΒΔ…
Add Listener import Store = require('./store'); class DirectiveController { constructor()
{ Store.addListener(this.someMethod); } } ! class Store { addListener(listener) { this.$rootScope.$on(EVENT_NAME, listener); } ! hasChanged(err) { this.$rootScope.$broadcast(EVENT_NAME, err); } } Gather into one class ✌️
Respect for F... • An Architecture F... Action -> Dispatcher
-> Store -> View • My Angular 1.3 Project Child Directive Controller -> Dispatcher -> Store -> Root Directive • Without ng-controller, Angular DI, service, factory. Browserify is helpful us.
Find more on GitHub https://github.com/armorik83/interactive-sem/tree/latent-variable Thanks a lot!