Some time ago i look to many approaches about organization concepts and patterns clean code for AngularJs. In result i want to put in next articles code from lessons of John Papa and Ari Lerner - NG-Book - 2013. More than, i want to separate in pieces all code, to not mix all these things in one and give to see more clearly how works they separately.
When i start to make some program i love to start from small and easy thing to more complicated. So for the first i will configure the logging .
I don’t know how you but i like to see in images all things, i hope you will not be frustrated if i will use images.
Step 1. I add the logger folder like below and add script “logger.module.js” . In this file usually we just initialize new module, we can intuitively see from name of file.
Code: Read code
Step 2. Add logger
Code: Read code
Step 3. Use code
Code: Read code
Source of code