You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/model-classes.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,6 +131,46 @@ A new `setupinstance` class method is now available in version 2.0. The functio
131
131
-`store` - The vuex store
132
132
-`Models {Object}` The `globalModels` object, which is the same as you'll find inside a component at `this.$FeathersVuex`.
133
133
134
+
### on <Badgetext="2.3.0+" />
135
+
136
+
Register event handlers to listen to events.
137
+
138
+
### once <Badgetext="2.3.0+" />
139
+
140
+
Register an event handler that only occurs once.
141
+
142
+
### off <Badgetext="2.3.0+" />
143
+
144
+
Remove an event handler.
145
+
146
+
## Model Events <Badgetext="2.3.0+" />
147
+
148
+
Model classes are EventEmitter instances which emit service events when received (technically, EventEmitter methods are mixed onto each Model class). All FeathersJS events are supported. Here’s an example of how to use it in a component:
0 commit comments