-
Book Overview & Buying
-
Table Of Contents
AngularJS Directives Cookbook
By :
A very useful way to develop applications with AngularJS is to use a code generator, use a simple Boilerplate, or to create your own generator or guidelines to follow. We have a lot of good practices spreading on the Internet. However, you should find your own way too.
We often need to write enough code to have a fast start, and putting a simple application in production requires many lines of code, so using tools like generators can be very productive. However, let's see some tips on how to organize our code in order to have a highly scalable application.
Regardless of a code generator or boilerplate, you should choose to organize your content in a modular way by grouping by features. Grouping files by features facilitates maintenance and allows you to scale the application more easily.
We will use the same code base for the previous recipe to explain the benefits of this kind of organization. The following screenshot shows a directory...
Change the font size
Change margin width
Change background colour