Resolve Error: error:modulerr Module Error by adding the logic to a separate module  (see for more info: https://docs.angularjs.org/error/$injector/modulerr)