dimanche 4 juin 2017

AngularJS and Laravel Foreach

I do have a problem with using Angular with Laravel's foreach loop, i tried to be as detailed as possible :)

<div style="padding:15px;" id="table-scroll" ng-app>
    <table class="table table-responsive tblProducts" id="tblProducts">
                  <thead>
                       <tr>
                           <th>Description</th>
                           <th>Prices</th>
                           <th></th>
                           <th></th>
                           <th>Action</th>
                       </tr>
                 </thead>

                 <tbody>
                                //foreach loop here
                 </tbody>
       </table>
</div>

this is my foreach loop

@foreach($products as $product)


product_price }}" ng-model="price">

@
@endforeach

Problem:

-When I use "ng-model" the prices/quantity are not displayed, but when i use "ng-bind" the prices/quantity are displayed but the subtotal column displays NaN (i have no idea why).

Flow:

-Each row of that table displays a list of grocery items, when the checkbox is clicked, it means that the item is selected and transferred to another table for calculating the grandtotal.

Reference: https://ibb.co/hCddLv (snap from list of grocery items) https://ibb.co/e0jk0v (when that product is transferred, this happens) *im using "ng-bind" to display the price and quantity...

Thanks for the answer in advance guys...



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2st01ji
via IFTTT

Aucun commentaire:

Enregistrer un commentaire