lundi 30 mars 2020

TypeError:'caller', 'callee',and 'arguments' properties may not be accessed on strict mode

my website in code igniter and I'm calling the following service.js from controller

            postCarouselId: function (data) {
             return $http.post(ServiceUrl + '/carousel_id',{
                param:data,
                headers: {'Content-Type': 'application/x-www-form-urlencoded'}
             });
            },

controller:

 CampaignsServices.postCarouselId($scope.myCarouselId).success(function () {
        debugger
        CampaignsServices.getCarouselDetails().success(
            function (data) {
                debugger
                $scope.CarouselDetails = data;
                $scope.loading=false;
            }).error(function (data) {
            console.log(data);
        });
    });

I remove 'use strict'; but still return the same, postCarouselId failed with error below. and getCarouselDetails has been never called

TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function.invokeGetter (:1:142) at Object.postCarouselId (http://localhost/palpay-angular/app/js/services.js:957:17) at Constructor. (http://localhost/palpay-angular/app/js/controllers.js:4618:27) at invoke (http://localhost/palpay-angular/app/lib/angular/angular.js:3760:17) at Object.instantiate (http://localhost/palpay-angular/app/lib/angular/angular.js:3771:23) at http://localhost/palpay-angular/app/lib/angular/angular.js:6881:28 at link (http://localhost/palpay-angular/app/lib/angular/angular-route.js:909:26) at nodeLinkFn (http://localhost/palpay-angular/app/lib/angular/angular.js:6309:13) at compositeLinkFn (http://localhost/palpay-angular/app/lib/angular/angular.js:5720:15) at publicLinkFn (http://localhost/palpay-angular/app/lib/angular/angular.js:5625:30)

could any one help please




Aucun commentaire:

Enregistrer un commentaire