问题
I am using knockout with my ASP.NET Core project to achieve following 1- I am trying to compute the sold inventory based upon opening, closing and delivery inventory of a product.
I have four arrays. OpeeningInventories
,ClosingInventories
, DeliveredInventories
and SoldInventories
. I am creating these arrays identically at the server side. Each array have a number of GasProducts (model). I have created JSFiddle to show you the code. Sorry the code somewhat works in my project but it is not working in JSFiddle. I will greatly appreciate if you can help me fix my problem. Thanks in advance. Here is the link to JSFIDLE
来源:https://stackoverflow.com/questions/40309029/knockout-computed-observable-array-from-other-observable-arrays