How to setup service to pass google sheet IDs? AngularJS

后端 未结 3 930
无人及你
无人及你 2021-01-18 04:19

I am building a small widget using angular that takes Google sheet Ids given by user and publishes the output in nice json format. The problem is that my code does nothing.

3条回答
  •  轮回少年
    2021-01-18 04:45

    Could be that there were 2 return statements in the service? Statement moved:

    angular
        .module('adf.widget.charts')
        .service('chartService', chartService);
    
        function chartService(){
            return {
                getUrl: function(key) {
                    var googleSheetkey = key;
                    return googleSheetkey;
                }
            };  
        }
    

提交回复
热议问题