sails-generate-ng-curd

0.12.0 • Public • Published

sails-generate-ng-curd

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.

Installation

$ npm install sails-generate-ng-curd

Usage

On the command line
$ 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

Example Project

Quick Start

  1. Define your Model

api/models/Test.js

module.exports = {

  attributes: {

    att_id : {     
    	type: 'integer',
        primaryKey: true 
    },

    att1 : { type: 'string' },

    att2 : { type: 'string' }
  }
};
  1. 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

  1. Generate your controller/view/js
sails generate ng-curd test att_id att1 att2
  1. Launch your sails and visit http://localhost:1337/Test
sails lift

UI Prevew

List page

New or edit record

Development

To get started quickly and see this generator in action, ...

Also see CONTRIBUTING.md for more information on overriding/enhancing existing generators.

Questions?

See FAQ.md.

More Resources

License

MIT © 2015 balderdashy & contributors

As for Sails? It's free and open-source under the MIT License.

image_squidhome@2x.png

Package Sidebar

Install

npm i sails-generate-ng-curd

Weekly Downloads

0

Version

0.12.0

License

MIT

Last publish

Collaborators

  • shootsoft