Expand my Community achievements bar.

SOLVED

Edit AngularJS Components in AEM

Avatar

Level 6

I have tried to create angularJS app inside AEM with routing . The  ng-view directive is present in index page (to include another page with another template). Added parsys in partial page. Once I add the components in index page, i am unable to edit or delete it from index page. Is there anyway i can edit the component in index page?

1 Accepted Solution

Avatar

Correct answer by
Employee

You should add a logic in the main page controller to not other pages as partials and just load them in window.location. The routes would still be the same. All these pages should load with the authoring specific js included on load in author mode. I have not seen ur code. But this should work.

View solution in original post

4 Replies

Avatar

Level 10
  Why are you using angular  in this manner. Why not use Angular logic in a component JSP? Then place a dialog on the component and treat the component like a standard AEM component. I am trying to understand your use case.     

Avatar

Level 10
Then once you build an AEM component  using Angular logic,  drop the component onto an AEM page and edit like normal. For those reading this thread and wanting to use Angular and AEM, see https://helpx.adobe.com/experience-manager/using/AngularJS.html  

Avatar

Level 6

Our application is basically an angular app. We are trying to use AEM for managing static content and angularJS services for dynamic content. We consider the pages in AEM as partials and add static content to it. Dynamic content is rendered from AngularJS as they are executed in browser. AngularJS app javascript files are hosted in different apache server. 
There is no problem when we are using simple controller concept in single page. Problem arises when we implement the routing capability to include many pages for respective url ,since the html for ng-view is rendered dynamically based on routing in angularJS app.
 

Avatar

Correct answer by
Employee

You should add a logic in the main page controller to not other pages as partials and just load them in window.location. The routes would still be the same. All these pages should load with the authoring specific js included on load in author mode. I have not seen ur code. But this should work.