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
At the moment our association decorators return an UnresolvedModel, while the API request is pending.
This has typically not been a problem when using model information inside the angular template, because it will re-render when the model gets resolved.
However, if you want to use an associated model and chain it to another api request, or extract a value (not in the template), you will not be able to use the associated model as it will be an UnresolvedModel.
To fix this, the association decorators should return a promise that we can await while fetching results.
At the moment our association decorators return an
UnresolvedModel
, while the API request is pending.This has typically not been a problem when using model information inside the angular template, because it will re-render when the model gets resolved.
However, if you want to use an associated model and chain it to another api request, or extract a value (not in the template), you will not be able to use the associated model as it will be an
UnresolvedModel
.To fix this, the association decorators should return a promise that we can await while fetching results.
e.g. It would be really nice to do something like
Using an
UnresovledModel
also subverts the TypeScript type checking, meaning that we will not get a warning if the request is still pending.The text was updated successfully, but these errors were encountered: