0

I am seeing a weird issue and spending unfruitful time.

In my controller I have an object declared as

$scope.brfdet = { iJobId: $scope.job.iJobId, iAppType: null, dEarlyShipmentDate: null, dStockdate: null, dFromDate: null, dToDate: null};
console.log('$scope.brfdet: ', $scope.brfdet);

The console log shows it correctly as this:

$scope.brfdet: { iJobId: 3245, iAppType: null, dEarlyShipmentDate: null, dStockdate: null, dFromDate: null, dToDate: null};

However, just before I submit the data, I see that the value of variable as below.

$scope.brfdet: [dFromDate: "01/01/2020", dToDate: "01/01/2021", iAppType: "1"]

I'm clueless why this is happening. Please help.

UPDATE:

I could figure it out. The $scope.brfdet was getting set to an empty array in an AJAX call - a fault in the API.

0

1 Answer 1

1

It looks like that something else is linked to $scope.brfdet. Is it used anywhere else (e.g. in a view)? How do you submit the data? What is happen in your code between "console log" output and submit?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.