Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F78375547
pub-sub.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Aug 20, 10:40
Size
519 B
Mime Type
text/x-java
Expires
Thu, Aug 22, 10:40 (2 d)
Engine
blob
Format
Raw Data
Handle
20035409
Attached To
R2664 SHRINE MedCo Fork
pub-sub.js
View Options
//https://ilikekillnerds.com/2016/11/injection-inheritance-aurelia/
import
{
EventAggregator
}
from
'aurelia-event-aggregator'
;
import
{
commands
,
notifications
}
from
'./shrine.messages'
;
export
class
PubSub
{
static
inject
=
[
EventAggregator
,
commands
,
notifications
];
constructor
(
evtAgg
,
commands
,
notifications
){
this
.
commands
=
commands
;
this
.
notifications
=
notifications
;
this
.
publish
=
(
c
,
d
)
=>
evtAgg
.
publish
(
c
,
d
);
this
.
subscribe
=
(
n
,
fn
)
=>
evtAgg
.
subscribe
(
n
,
fn
);
}
}
Event Timeline
Log In to Comment