I would appreciate some direction on how to best integrate Angular into the Moqui framework. I see that others are working with Moqui and Angular however I am unable to find any direction on how to best address this and can't work it out on my own. It would appear to me that services set up to return JSON to the Angular $scope
would be required. Specific examples of how to best integrate Angular and Moqui would be greatly appreciated.
Asked
Active
Viewed 270 times
0

Vy Do
- 46,709
- 59
- 215
- 313
-
it's not exactly clear what you are asking how to do; moqui isn't HTML, so angular isn't really going to work in it's context; *earlier* versions of angular may have worked with moqui when controllers were allowed to be declared as global objects, but that's no longer the case. – Claies Sep 16 '15 at 04:11
-
Here Moqui will behave as the server that will be having transitions through which your Angular app will communicate by making REST calls. – adityazoso Sep 16 '15 at 04:59
-
To add further clarification. My assumption is that it will be necessary to make REST calls via Moqui services and what I am looking for is how to wire up the REST calls to Angular. I can see how this is done in other frameworks like Spring however can't work it out in Moqui. – Matthew Watson Sep 16 '15 at 13:36
-
Do you have any details about what you have tried and that didn't work doing REST calls to Moqui from Angular? That might make the question easier to answer. I only know details of one project based on Moqui/Mantle/etc that uses an all Angular UI (with the HTML and some JavaScript generated from template through Moqui screens), and they found ways to handle it well. Options are service calls mapped through screen transitions and the generic Entity Find/CrUD interface. – David E. Jones Sep 16 '15 at 16:51
-
Thanks for the follow up David. I have not attempted to integrate Angular via REST calls at this point as I am not sure that is the best way to go. I see that as a mechanism employed by users of Spring to integrate with Angular and thought that would be a viable way. My preference would be to stay within the Moqui framework as much as possible and what you suggest via service calls, screen transitions and the Entity Find interface seems as if that would keep me more within the Moqui framework approach. – Matthew Watson Sep 16 '15 at 17:07
-
Specific use case: Take the results of an entity find output and place it into the Angular $scope object. Take Angular DOM values and update Moqui entity data with the data. – Matthew Watson Sep 16 '15 at 17:09
-
That is what we have achieved. The transitions in Moqui can send and accept JSON objects. So we make the appropriate REST call (i.e. GET) to the Moqui server that provides us with the desired JSON object. This response is then updated in the Angular $scope using the Angular Controllers and for updating the Moqui entity data we will make PUT or POST calls. The transitions will be actually containing the appropriate service calls for performing these operations. – adityazoso Sep 17 '15 at 09:04