Click here to Skip to main content
15,894,343 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
The commented part will lie under $scope.$on. I need to return options to the place where I have kept $scope.$emit. Please HELP!!!

Even if there is any other way to do this then let me know. Also this code is under angular custom directive which is being used in many places so I can't keep the commented code there. It has to be passed from somewhere outside.

What I have tried:

if (gridConfig.Batch) {
                gridOption.dataSource.transport["parameterMap"] = function (options, operation) {
                    var data = {
                        options: options,
                        operation: operation
                    };
                    $scope.$emit('parameterMap', data);
                    //if (operation !== "read" && options.models) {
                    //    angular.forEach(options.models, function (value) {
                    //        value.MfgDt = kendo.toString(value.MfgDt, "s");
                    //        value.ExpDt = kendo.toString(value.ExpDt, "s");
                    //        value.ProductType = value.ProductType.Id;
                    //    })
                    //    return options;
                    //}
                }
            }
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900