W3cubDocs

/Ember.js 4

Function

eachRelatedType (callback, binding) public

Module: @ember-data/model
callback
Function
the callback to invoke
binding
Any
the value to which the callback's `this` should be bound

Given a callback, iterates over each of the types related to a model, invoking the callback with the related type's class. Each type will be returned just once, regardless of how many different relationships it has with a model.

© 2022 Yehuda Katz, Tom Dale and Ember.js contributors
Licensed under the MIT License.
https://api.emberjs.com/ember-data/4.9/functions/Model/eachRelatedType