<body>
<div ng-controller="logonController">
Productname: <input type="text" name="txtname" ng-model="products[0].Productname"/><br>
price: <input type="text" name="txtname" ng-model="products[0].price"/><br>
brandname: <input type="text" name="txtname" ng-model="products[0].brandname"/><br>
mfgdate: <input type="text" name="txtname" ng-model="products[0].mfgdate"/><br>
<span>{{myname}}</span>
<table border="1">
<tr>
<td>Productname</td>
<td>price</td>
<td>brandname</td>
<td>mfgdate</td>
</tr>
<tr>
<td>{{products[0].Productname}}</td>
<td>{{products[0].price}}</td>
<td>products[0].brandname</td>
<td>{{products[0].mfgdate}}</td>
</tr>
</table>
</div>
<script>
angular.module("jj",[]).controller("logonController",function($scope){
$scope.products = [
{Productname:'iphone', price:'408 555 1212',brandname:'Apple',mfgdate:'123'},
];
}
);
</script>
</body>
<div ng-controller="logonController">
Productname: <input type="text" name="txtname" ng-model="products[0].Productname"/><br>
price: <input type="text" name="txtname" ng-model="products[0].price"/><br>
brandname: <input type="text" name="txtname" ng-model="products[0].brandname"/><br>
mfgdate: <input type="text" name="txtname" ng-model="products[0].mfgdate"/><br>
<span>{{myname}}</span>
<table border="1">
<tr>
<td>Productname</td>
<td>price</td>
<td>brandname</td>
<td>mfgdate</td>
</tr>
<tr>
<td>{{products[0].Productname}}</td>
<td>{{products[0].price}}</td>
<td>products[0].brandname</td>
<td>{{products[0].mfgdate}}</td>
</tr>
</table>
</div>
<script>
angular.module("jj",[]).controller("logonController",function($scope){
$scope.products = [
{Productname:'iphone', price:'408 555 1212',brandname:'Apple',mfgdate:'123'},
];
}
);
</script>
</body>
No comments:
Post a Comment