Expand my Community achievements bar.

Angular Integration in AEM - Currentpage is not working

Avatar

Level 5

Hi Team,

 

We are currently integrating AEM with angular.

Hitting URL :

http://localhost:4502/content/my-project/us/en/home.html page at which we are including the component(i.e. getting a current page method in sling model) but its returning always en.model.json

Response:

Path: "/content/my-project/us/en.model.json" is the path given by JSON.

Expectation: /content/my-project/us/home.model.json

Is there anything we are missing or any way to get the current page object on JSON file 

1 Reply

Avatar

Community Advisor

Hi @AEMLearner-1989 

 

What is the navigation root you have configured on your component? I believe you must have configured it as "/content/my-project/us/en" which is why your component response is returning as /content/my-project/us/en.model.json and that is expected functionality.

 

Refer the link here for more info:

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/s...

 

Thanks!