angular-app /angular-app

Reference application for AngularJS

★ 5,774⑂ 1,701👁 313⑃ 111● 186▤ 0
JavaScriptMITCreated 2012-09-04
+0
Daily
5,774
stars
1,701
forks
313
watchers
111
prs
186
issues
0
releases

README

AngularJS CRUD application demo



 Purpose

The idea is to demonstrate how to write a typical, non-trivial CRUD application using AngularJS. To showcase AngularJS in its most advantageous environment we've set out to write a simplified project management tool supporting teams using the SCRUM methodology. The sample application tries to show best practices when it comes to: folders structure, using modules, testing, communicating with a REST back-end, organizing navigation, addressing security concerns (authentication / authorization).

This sample application is featured in our book where you can find detailed description of the patterns and techniques used to write this code:



We've learned a lot while using and supporting AngularJS on the mailing list and would like to share our experience.

 Stack

 Persistence store: MongoDB hosted on MongoLab
 Backend: Node.js
 Awesome AngularJS on the client
 CSS based on Twitter's bootstrap

 Build

It is a complete project with a build system focused on AngularJS apps and tightly integrated with other tools commonly used in the AngularJS community:
 powered by Grunt.js
 test written using Jasmine syntax
 test are executed by Karma Test Runner (integrated with the Grunt.js build)
 build supporting JS, CSS and AngularJS templates minification
 Twitter's bootstrap with LESS templates processing integrated into the build
 Travis-CI integration

 Installation

 Platform & tools

You need to install Node.js and then the development tools. Node.js comes with a package manager called npm for installing NodeJS applications and libraries.
 Install node.js (requires node.js version = 0.8.4)
 Install Grunt-CLI and Karma as global npm modules:

    
    npm install -g grunt-cli karma
    

(Note that you may need to uninstall grunt 0.3 globally before installing grunt-cli)

 Get the Code

Either clone this repository or fork it on GitHub and clone your fork:


git clone https://github.com/angular-app/angular-app.git
cd angular-app


 App Server

Our backend application server is a NodeJS application that relies upon some 3rd Party npm packages.  You need to install these:

 Install local dependencies (from the project root folder):

    
    cd server
    npm install
    cd ..
    

  (This will install the dependencies declared in the server/package.json file)

 Client App

Our client application is a straight HTML/Javascript application but our development process uses a Node.js build tool
Grunt.js. Grunt relies upon some 3rd party libraries that we need to install as local dependencies using npm.

 Install local dependencies (from the project root folder):

    
    cd client
    npm install
    cd ..
    

  (This will install the dependencies declared in the client/package.json file)

 Building

 Configure Server
The server stores its data in a MongoLab database.
 Create an account at MongoLab - it's free: [https://mongolab.com/signup/].
 Create a database to use for this application: [https://mongolab.com/cre

Top issues

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON