Having a loop in angular with $timeout

When first starting out with angular I found myself having logic in my controllers which is not really what a controller id for. Loops, and app login in general, is best placed inside services made with module.factory, or one of the other options for doing so.

In this post I will be covering how I go about making a loop in a service, and using a controller to update the view with the latest data from that service.

Read More

The deal with the angular.js factory for making services

I am still somewhat new with angular.js, but I have been working hard on making a lot of cool demos, and apps with in in my test_angular project. When first starting out I would have logic in my controllers, which is not what they are for, they should be thin. In addition I would keep writing some of my modules in my old vanilla js manner, which works of course, but I am using angular so I should do something that makes my modules angular like. One way to do this is to use a Factory, It is one of three ways to make what is called a service in angular speak.

Read More