I have written an angularjs factory as below
angularjs
module.factory(\'LogService\', function () { function log(msg) { console.log(\"Rahkara
In your case there will be always a non-undefined value returned. But in other cases the issue might be also that you do return null or undefined value from the factory.