How do I add Experience Fragment in Angular SPA. I'm using AEM 6.5.8 | Community
Skip to main content
New Participant
Apr 29, 2021 7:38 AM UTC
Solved

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

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.

6 replies

Level 3
Apr 30, 2021 8:54 AM UTC

 

@umittal_woolworths 

Try like below

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

Translate
kautuk_sahni
Employee
May 4, 2021 7:52 AM UTC
@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.
Translate
Kautuk Sahni
Level 3
Apr 29, 2021 1:32 PM UTC

@umittal_woolworths 

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

Translate
New Participant
Apr 29, 2021 11:17 PM UTC
Hi @krishna_chaita2 can you please help with any example of how to include content. Thanks
Translate
New Participant
Apr 29, 2021 11:15 PM UTC
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.
Translate