MeanJS: Generate the Sub-CRUD-Module with the generator? MeanJS: Generate the Sub-CRUD-Module with the generator? mongoose mongoose

MeanJS: Generate the Sub-CRUD-Module with the generator?


Create all needed files direct in the father module.

I did something similar to avoid referencing to other documents, you can edit the module schema to embed a schema into a schema, check this link:

http://www.jonahnisenson.com/schema-within-a-schema-use-embedded-documents-in-mongoosemongo/


You don't have to generate a separate CRUD Module for it. Generate a normal CRUD Module for the Articles and in the server sub-folder, you can create the model of the comments. After creating the Comments Model, You can then create another Model for Articles and then you refer to the Comments Model as part of the Article Model.