How do I add Experience Fragment in Angular SPA. I'm using AEM 6.5.8 | Community
Skip to main content
April 29, 2021
Solved

How do I add Experience Fragment in Angular SPA. I'm using AEM 6.5.8

  • April 29, 2021
  • 3 replies
  • 1721 views

Hi, I'm trying to create an Angular SPA which references XF's. Has someone done something similar. There is no reference of this in core components of wknd spa examples. 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Vaibhavi_J
Vaibhavi_JAccepted solution
Level 7
April 29, 2021
April 29, 2021
Hi @vaibhavi_j, I checked above thread before posting question here. though it was easy to extend container exporter for XF, I was not able to work with Angular side and convert model.json response into angular rendered components. If you have done this before can you please share example of Angular code which will help me.
Level 3
April 29, 2021

@umittal_woolworths 

AEM XF can be accessed with their respective url's. you can use "ng-include" to load the XF content.

April 29, 2021
Hi @krishna_chaita2 can you please help with any example of how to include content. Thanks
Level 3
April 30, 2021

 

@umittal_woolworths 

Try like below

<div ng-include="'<XF_Path>'"></div>
Example
<div ng-include="'/content/experience-fragments/samplexf/master.html'"></div>

kautuk_sahni
Community Manager
Community Manager
May 4, 2021
@krishna_chaita2, thank you for your answer. Good to have AEM SMEs like you in the AEM Community. Keep the wonderful work going. Hope to see you more in the AEM community.
Kautuk Sahni