javascript - Unable to do mathematical calculations in angularJS -


What I'm trying to achieve is in this way, I have two columns in the present quantity present in my hand, The next time there is a pack-up column, it will have a text box with the default value, when I will change the value inside that textbox and submit the button, I should assume that my first column (quantity) (which is done) Should be deducted. After this I would like to add value to the text box in the previous column, so that I can see how many things have been packed so far so far I have made something like this

   & Lt; / TD & gt; & Lt; TD & gt; {{Data.packed}} & lt; / TD & gt; & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td width = "100%" colspan = "4" & gt; & Lt; Button ng-show = "prdElement.show" ng-click = "new package item (PDF, $ event)" & gt; Next pallet & lt; / Button & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Tbody & gt; & Lt; / Table & gt; & Lt; / Div & gt; Controller ('MainCtrl', function ($ scope)) {/ code>  

  (function () {angular.module ('myApp', []). Counter = 0; $ scope.packageElement = [{Name: Counter, Show: True, Data: [Name: 'Item 1', Item ID: '284307', Quantity: '100', Packed: 0}, {Name: 'item2', item ID: '284308', quantity: '200', packed: 0}]}] $ scope.newPackageItem = function (packageAdent, $ event) {var npackageElement = {}; angular .copy (Package Element, NpackageElement); Counter ++; PackageAllimate.Show = False; npackageElement.name = Counter; angular. Formerly (npackageElement.Data, Function (line) { The (Panktikgunta! Align = Anwakvititi || line. Qualification! = 0) {Row.quantity = row.quantity - row.newquantity; row.packed = row.newquantity;}}); npackageElement.show = true; angular (Package element.data, function (line) {row.packed = row packed + row.newquantity;}); $ scope.packageElement.push (npackageElement);}}})}}} ());   

When any volume is added to the plate and leaves the pressed button, then I get that column in the previous column (already packed) I want to show on and follow the later lines. I have made a try as you can see

  row.packed = row.packed + row.newquantity;   

But additionally does not work correctly, but rather adds value.

Try

  row.packed = number (row pocket) + Number (line enwmentity);   

here

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -