Provider 'xx' must return a value from $get factory method in AngularJs

前端 未结 2 504
小鲜肉
小鲜肉 2020-12-15 03:43

I have written an angularjs factory as below

module.factory(\'LogService\', function () {

    function log(msg) {
        console.log(\"Rahkara         


        
2条回答
  •  南笙
    南笙 (楼主)
    2020-12-15 03:58

    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.

提交回复
热议问题