Zaid Iqbal
Zaid Iqbal

Reputation: 1692

Multiple modules List in a Dashboard - Yeoman MEANJS Generator

I am new in MEANJS and someone suggest me to go with MEANJS for kickstart app. I have started working on it and trying to make an architecture for my app but i am confused in 1 thing that what will be the architecture if i need to work in cross modules.

What I want is that I have 2 CRUD modules Articles and Needs now I want to show my Needs list and Articles list on my dashboard (core module home page). Please help me and how can i communicate between different modules. App is medium size.

Waiting for suggestions..

Upvotes: 1

Views: 110

Answers (1)

Luke Kroon
Luke Kroon

Reputation: 1103

I think your best way of doing this is by using the REST api's of each module. In core/client/services add new services for retrieving the data from /api/articles and /api/needs (use the same services as in articles/client/services/articles.client.service.js).

Call the services in core/client/controllers/home.client.controller.js to get the data and display it in core/client/views/home.client.view.html.

Hope this helps a bit. Im also quite new to MeanJS.

Upvotes: 1

Related Questions