-
Book Overview & Buying
-
Table Of Contents
AngularJS Directives Cookbook
By :
An important key is the consistency of your code; there are many ways to do it right.
Another important key is the principle of DRY (Don't Repeat Yourself). DRY code is easier to work with and will help you build applications that are more maintainable.
Pay close attention to naming conventions, this is another very important point. Using intuitive and short names makes your code easier to work and makes it easier to keep a pattern.
No pattern is absolutely failsafe or bullet proof, but you must choose which best fits your application and use it from start to finish.
Large-scale applications often grow at a steady pace from their beginning until you reach an intermediate state; however, from this stage, things tend to get out of control and grow wildly if there has been no pattern previously established since the beginning.
Let's see an example of a web interface built only with customized directives, something very similar to web...
Change the font size
Change margin width
Change background colour