Giter Club home page Giter Club logo

angular-seed-1's Introduction

Angular + RequireJS Boilerplate

This project is an application skeleton for an ideal AngularJS web app. You can use it with a minimal configuration to easily bootstrap your angular projects.

The seed contains the AngularJS and RequireJS libraries, and a clean directory structure for your app. Just clone the repo (or download the zip/tarball), start up a web server and you are ready to develop with a minimum effort.

The sample app in this seed doesn't do much, just shows how to hook up couple of controllers and views together. You can check it out by opening index.html in your browser (using a local web server of course!)

Directory Structure

The directory structure is flexible. It doesn't have to be in the following structure. You can always change it from config.js.

root
|
├── js
|   |
|   ├── app
|   |   |
|   |   ├── controllers
|   |   ├── directives
|   |   ├── filters
|   |   ├── services
|   |   ├── views
|   |   |
|   |   ├── config.js
|   |   └── main.js
|   |
|   └── lib
|       |
|       ├── angular.js
|       ├── ng-app.js
|       └── require.js
|
└── index.html

Configuration

  • Step 1 - For each application, copy the app directory and place it where you like.
  • Step 2 - Rename the directory.
  • Step 3 - Open up config.js, and modify it to match your app configuration:
define({
	appName: 'YourAppName',
	appDir: '/js/app',
	libDir: '/js/lib',
	routes: {
		'/path' : 'subdir/Controller1',
		'/path/with/:id' : 'subdir/Controller2',
		'/more/path' : 'Controller3'
	},
	defaultRedirect: '/path'
});

Notice that, the controllers and views can be organized by placing them under sub-directories. But it still works, if you wish to place them directly under the controllers and views directories.

Seed Project : PhoneBook App

The PhoneBook example project included in this seed has two controllers (Contact and ContactDetail) and one service (contactService). The purpose is simply retrieving data from a model and populate the view accordingly.

Inspired by

angular-seed-1's People

Contributors

mislam avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.