Whenever you write an AngularJS application, you will use modules. Modules divide you application into small logical pieces. Some pieces might depended on other, some might be totally independent.
angular.module('UserModule',); // no dependency!
angular.module('UtilModule',); // no dependency!
angular.module('MainModule',[ // 2 dependencies!
In the example above, you see three modules. A module called MainModule depending on two other modules, called UserModule and UtilModule. Note that this is […]
AngularJS provides 3 different ways to create a service: Factory A factory is a well known pattern in software development. It aims to create a certain object, in this case a service. In AngularJS this is simply a function which returns an object with methods. In my opinion, this is the cleanest way to create […]
Program to an interface, not an implementation. This short sentence, introduced in 1994 by the GoF, is one of the most important design principles in software development. However, I have seen several projects where this principle has gone wrong. Here’s why: Interface vs. Interface If you come from a Java background like myself and you […]