Expand my Community achievements bar.

SOLVED

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

Avatar

Level 1

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. 

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
6 Replies

Avatar

Correct answer by
Community Advisor

Avatar

Level 1
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.

Avatar

Level 3

@umittal_woolworths 

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

Hi @krishna_chaita2 can you please help with any example of how to include content. Thanks

Avatar

Level 3

 

@umittal_woolworths 

Try like below

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

Avatar

Administrator
@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