Skip to content

[V] $resource

const $resource: ResourceDecorator;

@resource marks a model as a resource type.

The first argument should be the name of the collection that the resources belong to. For example, a resource type Widget might have a collection name of widgets.

@resource can only be applied to models.