#HotTowel-ng HotTowel Angular starter project
Opinionated AngularJS style guide for teams by @john_papa
More details about the styles and patterns used in this app can be found in my AngularJS Style Guide and my AngularJS Patterns: Clean Code(coming soon) course at Pluralsight and working in teams.
The structure also contains a gulpfile.js and a server folder. The server is there just so we can serve the app using node. Feel free to use any server you wish.
/src
/client
/app
/content
Install Node.js
Install these NPM packages globally:
npm install -g bower gulp nodemon
- Open terminal
- Type
npm install
npm install
will install bower packages too, but you can do it manually.
- Open terminal
- Type
bower install
Runs locally, no database required.
Type gulp serve-dev
and browse to http://localhost:7300
Type gulp jshint
to run code analysis on the code.
Type gulp spy
to run code analysis using a watch.
The app is quite simple and has 2 main routes:
- dashboard
- admin list
The app has 4 feature modules and depends on a series of external modules and custom but cross-app modules
app --> [
app.admin,
app.dashboard,
app.layout,
app.widgets,
app.core --> [
ngAnimate,
ngRoute,
ngSanitize,
blocks.exception,
blocks.logger,
blocks.router
]
]
Core modules are ones that are shared throughout the entire application and may be customized for the specific application. Example might be common data services.
This is an aggregator of modules that the application will need. The core
module takes the blocks, common, and Angular sub-modules as dependencies.
Block modules are reusable blocks of code that can be used across projects simply by including them as dependencies.
The blocks.logger
module handles logging across the Angular app.
The blocks.exception
module handles exceptions across the Angular app.
It depends on the blocks.logger
module, because the implementation logs the exceptions.
The blocks.router
module contains a routing helper module that assists in adding routes to the $routeProvider.