Reputation: 4775
yo meanjs:crud-module
generates a module similar to 'articles' modules.
Is there a way to generate module from a custom model/schema ?
Upvotes: 0
Views: 327
Reputation: 1103
The generator is only a starting point for your module.
When creating the module, start from the back and edit your way to the front:
modules/articles/server/models/articles.server.model.js
change the schema to fit your requirements. The controllers and routes on the server side don't need any changing. Then you move to:
modules/articles/client/views/view-articles.client.view.html
Here you add new inputs that matches your schema. After that you should be done with your 'custom model/schema'. Hope this helps.
Upvotes: 3