In response to your query about the issue of "ng-value not updating Ng-model," it is important to understand that this behavior is intentional. Both ng-value
and ng-model
were not designed to be used in this particular way.
It seems there may be some confusion regarding your objective, so here are a couple of potential solutions:
If your goal is simply to display a value without user input, you can achieve this without using an input at all. The following examples will both update accordingly:
<span>{{subOrderList.sum('Quantity')}}</span>
<span ng-bind="subOrderList.sum('Quantity')"></span>
However, if you do require user input to update the value, then your HTML should resemble something like this:
<input ng-model="Order.Quantity" type="number">
In such cases, you would need to manually update the value within a controller or service when necessary:
Order.Quantity = subOrderList.sum('Quantity');
Based on your comments, it appears that you might need an input that changes dynamically and sporadically. Without a specific data example or more code, it is difficult to provide a precise solution for this scenario.