A ng-curd
generator for use with the Sails command-line interface.
Certain generators are installed by default in Sails, but they can be overridden. Other generators create entirely new things. Check the Sails docs for information on installing generator overrides / custom generators and information on building your own generators.
$ npm install sails-generate-ng-curd
$ sails generate ng-curd <a name for your scaffold> <primarykey> <optional: attributename:attributetype> <optional: --force>
Example:
$ sails generate scaffold user id name:string age:integer email:email
- Define your Model
api/models/Test.js
module.exports = {
attributes: {
att_id : {
type: 'integer',
primaryKey: true
},
att1 : { type: 'string' },
att2 : { type: 'string' }
}
};
- Add JQuery, Bootstrap, JQuery Datatables, JQuery Block UI, Angular, Angular Datatables into your layout file
Examples: https://github.com/shootsoft/sails-ng-curd/blob/master/tests/views/layout.ejs
- Generate your controller/view/js
sails generate ng-curd test att_id att1 att2
- Launch your sails and visit http://localhost:1337/Test
sails lift
To get started quickly and see this generator in action, ...
Also see CONTRIBUTING.md
for more information on overriding/enhancing existing generators.
See FAQ.md
.
- Stackoverflow
- #sailsjs on Freenode (IRC channel)
- Professional/enterprise
- Tutorials
MIT © 2015 balderdashy & contributors
As for Sails? It's free and open-source under the MIT License.