Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. <div ng-app="MyApp" ng-controller="MyController">
  2. <input type="button" value="Generate Table" ng-click="GenerateTable()" />
  3. <hr />
  4.  
  5. <div ng-repeat="m in Customers" style="width:300px; height:200px; border:2px solid red; float:left; ">
  6. <!--
  7. <div style="width:100% height:20px"><input type="checkbox" ng-model="myController.checked" ng-click="invokeForm()"/></div>
  8. -->
  9. <div style="width:100% height:20px">
  10.  
  11. <input type="checkbox" ng-click="myFunc($index)" /></div>
  12. <div style="width:100%; height:inherit; position:absolute; background-color:red; visibility:hidden; ">something</div>
  13. <div style="width:100%; height:inherit; ; background-color:#fcfcfc; z-index:-1; ">
  14. <div style="width:100% height:">
  15. <img class="proimg" src="{{m.img}}" />
  16.  
  17.  
  18. <div ng-show="showMe" id="{{$index}}" class="prodet" >
  19. <div style="width:100% height:20px">{{m.CustomerId}}</div>
  20. <div style="width:100% height:20px">{{m.Name}}</div>
  21. <div style="width:100% height:20px">{{m.Country}}</div>
  22. </div>
  23.  
  24.  
  25. </div>
  26.  
  27. </div>
  28.  
  29. </div>
  30.  
  31.  
  32. </div>
  33.  
  34. var jsonAry = [
  35. { CustomerId: 1, Name: "Lakshmanan", Country: "United States", img:"products/ragi.png" },
  36. { CustomerId: 2, Name: "Mudassar Khan", Country: "India", img:"products/samai.png" },
  37. { CustomerId: 3, Name: "Suzanne Mathews", Country: "France", img:"products/thinai.png" },
  38. { CustomerId: 4, Name: "Robert Schidner", Country: "Russia", img:"products/varagu.png" },
  39.  
  40. ];
  41. var app = angular.module('MyApp', [])
  42. app.controller('MyController', function ($scope) {
  43. $scope.IsVisible = false;
  44. $scope.GenerateTable = function () {
  45. $scope.Customers = jsonAry;
  46. $scope.IsVisible = true;
  47. };
  48. $scope.invokeFor = function(){
  49. alert("hi");
  50. };
  51. $scope.myFunc = function(index) {
  52. //alert(index);
  53.  
  54. $scope.showMe = !$scope.showMe;
  55. };
  56.  
  57.  
  58. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement