- This allows for ease of file management and separation of content and functionality between sections.
- Everyone has their own preferences for file structure and site organization.
- When you add a new section, you just add a line pointing to its “include” file in the parent include file.
- You can continue to chain subsections by adding them the same way but within the section folder and including it’s in the parent .
- That way if the folder structure is changed, you only have to modify the line for the section in to update the base path, instead of having to modify each line in the to reflect the new folder structure.
A scalable boilerplate for AngularJS 1.x using requirejs
@nodenpm: angular-scalable-boilerplate (1.0.0): A scalable boilerplate for AngularJS 1.x usi…
Websites can be anything from a few pages to large scale sites with hundreds of different pages and radically different subsections. For example, a website’s “shop” and “support” sections may not have any functionality that is the same. This boilerplate is designed to facilitate being able to scale from the smallest to the largest websites.
There is a base set of files that are loaded to initialize your app. Shared services, directives, setup, etc. Subsections are a self-contained set of files which can be plugged in, moved, renamed, or include their own subsections. This allows for ease of file management and separation of content and functionality between sections.
The site is built up by chaining “include” files using RequireJS.
There are some basic comments within the files explaining what things are doing and where to make changes. Of course, this is just an example of what can be done. Everyone has their own preferences for file structure and site organization. If you look through the code for a few minutes, it should become fairly self-explanatory as to the basic principle of how to modularize your site for ease of management. From there, you can use it as a guide to set things up however you prefer.
For a small site, that is all you need.
, however you can structure things however you like.
to reflect the new folder structure.
The following are the angular plugins and other utilities included with the package for convenience. Technically, none of them are required other than angularjs and requirejs.
when it is complete. If not, run it manually.