Click here to Skip to main content
15,886,783 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, i am new in angular Js,i have one requirement using anglarjs i have one table having text boxes like

sno description qty price amount tax finalamount
txtbox txtbox txtbox txtbox tb tb tb

tb tb tb tb tb tb tb
. .
.
.
.
.
now i am entering values in qty textbox and price textbox result be changed other box

What I have tried:

<!Doctype html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js"></script>
   </head>
<body ng-model="">

    <form runat="server">
    <table>
        <thead>
            <tr>
                <td>sno </td>
                <td>des</td>
                <td>qty</td>
                <td>price</td>
                <td>amount</td>

            </tr>
        </thead>
        <tbody>
            <tr>
               <td><input type="text" ng-model="sno" placeholder="sno"</td>
                <td><input type="text" ng-model="des" placeholder="description"</td>
                <td><input type="text" ng-model="qty" placeholder="qty"></td>
                <td><input type="text" ng-model="price" placeholder="price"></td>
                
                <td><input type="text"   value="{{ qty * price }}" /></td>
                <td><input type="text"   value="{{(qty*price)*18/100}}"</td>
               

                </tr>
            <tr>
               
                   <td><input type="text" ng-model="sno1" placeholder="sno"</td>
                <td><input type="text" ng-model="des1" placeholder="description"</td>
                <td><input type="text" ng-model="qty1" placeholder="qty"></td>
                <td><input type="text" ng-model="price1" placeholder="price"></td>
                <td><input type="text" value="{{ qty1 * price1 }}" /></td>
                <td><input type="text"   value="{{(qty1*price1)*18/100}}"</td>
                </tr>   
            <tr>
               
                   <td><input type="text" ng-model="sno2" placeholder="sno"</td>
                <td><input type="text" ng-model="des2" placeholder="description"</td>
                <td><input type="text" ng-model="qty2" placeholder="qty"></td>
                <td><input type="text" ng-model="price2" placeholder="price"></td>
                <td><input type="text" value="{{ qty2 * price2 }}" /></td>
                <td><input type="text"   value="{{(qty2*price2)*18/100}}"</td>
                </tr>               
        </tbody> 
           
    </table>

    </form>
    </body>
    </html>
Posted
Updated 3-May-18 22:24pm
v2
Comments
Krunal Rohit 6-May-18 1:55am    
What's the question here ?


KR

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900