Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Product with date</title>
  4. <script src="~/Scripts/angular.min.js"></script>
  5. <script src="~/Scripts/App.js"></script>
  6.  
  7. </head>
  8.  
  9. <body ng-app="myApp">
  10. <h3>Products</h3>
  11.  
  12. <div ng-controller="mainController">
  13.  
  14. <table class="table table-striped">
  15. <tr ng-repeat="product in products">
  16. <td>{{product.ProductName}}</td>
  17.  
  18. <td>{{product.CreatedDate | date:"h:mma 'on' MMM d,y"}}</td>
  19.  
  20. <td>{{'1388123412323' | date:'MM/dd/yyyy h:mma'}}</td>
  21.  
  22. <td class="text-right">
  23. <button class="btn btn-danger" ng-click="deleteProduct(product)">X</button>
  24. </td>
  25. </tr>
  26. </table>
  27.  
  28. <input type="text" required ng-model="newProduct" />
  29. <a href="#" class="btn btn-primary" ng-click="addProduct()">Add Product</a>
  30.  
  31. </div>
  32. </body>
  33. </html>
  34.  
  35. $http.get('/home/GetProducts')
  36. .success(function (result){
  37. $scope.products = result;
  38.  
  39. })
  40. .error(function (data) {
  41. console.log(data);
  42. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement