These instructions will take you through the process of creating your first forms-angular application, which will consist of an input form for a simple model, a listing showing data already on file, search, menus and a simple report with several features including outputting to PDF.
If you want a sneak preview of what the input form will look like when you have finished take a look at one of the examples - there is a simple input form here and a more feature-filled one here.
(if you need to - you may already have these applications / packages installed)
Please note: the "just a few minutes" in the title starts from after these are installed!
npm install -g express
npm install -g bower
You have the option at this point (if you are really lazy and you aren't worried about
stuff happening in scripts you have never seen) you can do
wget https://raw.github.com/mchapman/forms-angular/dev/app/partials/get-started/get-started.sh && bash get-started.sh
.
If you want to understand a bit more about how the example app works you are better off working through
the instructions below.
Several other packages / components are installed by npm / bower, and some of them need to be understood before you can make best use of forms-angular (though you can do simple forms without). forms-angular is based on what has become known as the MEAN stack - made up of Mongo, Express and Node (all installed above) and Angular JS. All of these come with extensive documentation on their websites.
In addition to the MEAN stack, some grasp of Mongoose is a good idea for all but the simplest of forms, and knowledge of Twitter Bootstrap is recommended.
and comment out any lines that start with app.get(
:
// app.get('/', routes.index);
// app.get('/users', user.list);
Create the following files:
public/index.html
public/myapp.js
public/partials/index.html
public/partials/base-edit.html
public/partials/base-list.html
public/partials/base-analysis.html
node app.js
Visit http://0.0.0.0:3000
in your browser.