Hi Chaps,
Is there any hooks for ‘model data state’ (afterSerialize) ?
I know that we have Adapters and Serializers however I couldn’t find any hooks in docs.
I am not able to use afterModel hook as this is only for ‘plain’ model.
I’m using JSONAPI
I have 7 models where the main model is visitor and the rest models are used on specific situations like on click → get data for news model.
I prefer to load only visitor model, load css, components, wait for rendering and after that load data for specific model.
This specific data needs to be formatted and set as default questions to visitor.task(which is relationship to model task).answers (attribute for task).
Case: Clicking on task loading data which needs to be formated and save to attribute answers in model task and task have relationship to visitor. There can be more then 1 task.
I’m not too clear on the requirements. But maybe you can load the data upfront and use logic in the templates to render the data depending on the logic.