- Project directory Structure Division
Debug node. JS's Build Directory
Node_modules node. js Dependencies
SRC Project Source files
----|framework Project Framework
--------|app
--------|css
--------|data
--------|font
--------|img
--------|js
--------|plugin
----|modules
--------| The module name that is filled in the parent menu, the parent node
------------|app Main project documents
----------------|app.conffee Root Module configuration js, configure the parent module, about the parent of some JS
----------------| The module name, child node, which is filled in the Sub-menu
--------------------| App.conffee submodule Configuration js, configuring sub-module
--------------------| Folders for specific pages, such as Index/add/edit
------------------------HTML for |index.tpl.html page templates
------------------------The JS required in the |index.coffee index page
------------|i18n Internationalization
- The app three characters means the entrance.
- Development steps:
A) Add the above files and folders.
b) Configure each module for angular, then configure the routing for each page, and the controller with the same name can be used under different module
c) write the controller, read the data in the controller, perform various operations, if the operation is more than can be pumped into the service, and finally assign the result of the operation to the common $scope variable
d) write the template in HTML and bind the field in the corresponding location (value in the shared object in the $scope)
e) Multi-language configuration:
f) Add a resources file, configure the namespace, and then configure the value Key:value form that requires the use of multiple languages, in Index.coffee, in. config (["$translateProvider"], ($ Translateprovider), configure the specified resource namespace, and finally use the {{key|translate}} binding when the page is used.
g) Release:
h) in the project root directory, run the command line, run grunt build–release, Generate dist directory, will all the module inside all JS are compressed into a file.
Recommended directory structure for "ANGULARJS study notes" development, basic development steps