Hi,
I want to understand the flow of AEM + SPA how the en.model.json/home.model.json was formed and called to load. Is it in AEM or In UI it form en.model.json and called. Can anyone help the same.
Thanks & Regards,
Kalyan
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hello @Kalyan_ChakravarthyCh ,
are you referring to any documents/videos for it? Do you mind posting the link here. That would help explain the use case a little better.
thank you.
I believe AEM SPA is using Sling Model Exporter to get JSON representation of requested page. As you don't have HTL. You only serve a JSON to your React or Angular components.
Sling Model Exporter documentation:
You can find a nice reply in my opinion here : https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/model-json-not-showing-com...
Another article on SPA topic, where model.json is also mentioned, even thought I believe is very clear what is the purpose of model.json in general (not only in SPA context): https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/spa-aem-how-can-we-apply-b...
And here in the Introduction it explains high level how SPA works: https://experienceleague.adobe.com/en/docs/experience-manager-65/content/implementing/developing/spa...
Hi @Tethich ,
Thank you for the details. Iam looking how the home.model.json is loading from frontend. How it is forming the home.model.json and calling from UI.
Thanks & Regards,
Kalyan
Views
Replies
Total Likes
Is this what are you looking for ?
Or you need the under the hood coding and logic stuff that the framework is doing ?
Hi @Tethich ,
Yes Iam looking the hood coding and logic stuff that the framework is doing regarding how model.json is forming and calling in AEM-spa-model-manager
Thanks & Regards,
Kalyan
Views
Replies
Total Likes
Then maybe this is what are you looking for ?
https://github.com/adobe/aem-spa-page-model-manager/tree/master
en.model.json
/home.model.json
en
, home
), a Page Model is associated with it. This model includes:
model.json
file for a page is generated dynamically when requested via the model.json
URL for that page:
<page-path>.model.json
/content/mysite/en.model.json
/content/mysite/home.model.json
@exporter
in Java.en.model.json
/home.model.json
UI Layer (SPA Framework)
model.json
dynamically:
model.json
of the current page.GET /content/mysite/en.model.json
Dynamic Data Loading
Routing in SPA
model.json
files for sub-pages or components might be requested dynamically./content/mysite/en/about.model.json
@Kalyan_ChakravarthyCh Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
@Kalyan_ChakravarthyCh Follow below blog to get overall understanding on AEM + SPA using JSON
https://medium.com/@toimrank/aem-react-spa-fb10256dbdce
Views
Likes
Replies