Angular Integration in AEM - Currentpage is not working | Community
Skip to main content
AEMLearner-1989
Level 4
July 23, 2021
Question

Angular Integration in AEM - Currentpage is not working

  • July 23, 2021
  • 1 reply
  • 706 views

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 

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

1 reply

Asutosh_Jena_
Community Advisor
Community Advisor
August 20, 2021

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/spa-editor/react/navigation-routing.html?lang=en#react-routing

 

Thanks!