MEAN.JS and the CRUD Module Sub-Generator

MEAN.JS still needs to pulish a few things. For example, the compatibility with NODE 7.x. But a part from that, there is the CRUD Module Sub-Generator, which fails to properly add entries to the menu, and it is something that should be working out of the box.

Basically, you can use this generator for automatically creating the files needed for a CRUD interaction, but if you choose to add an entry to the menu… The website stops working and the only thing you can see is a blank page.

I was able to find more people with the same problem, for example:

  • https://groups.google.com/forum/#!searchin/meanjs/yo$20meanjs$3Acrud-module|sort:relevance/meanjs/wKavBQOCZvw/0-dlYj6hCLMJ
  • https://github.com/meanjs/mean/issues/347

But just when I was about to delete the project and find an alternative to MEAN.JS, I found the solution to the problem:

in client\config\customers.client.config.js reemplace this line:

menuConfig.$inject = [‘menuService’];

with this:

menuConfig.$inject = [‘Menus’];

Thanks StackOverflow!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.