Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Product with date</title>
- <script src="~/Scripts/angular.min.js"></script>
- <script src="~/Scripts/App.js"></script>
- </head>
- <body ng-app="myApp">
- <h3>Products</h3>
- <div ng-controller="mainController">
- <table class="table table-striped">
- <tr ng-repeat="product in products">
- <td>{{product.ProductName}}</td>
- <td>{{product.CreatedDate | date:"h:mma 'on' MMM d,y"}}</td>
- <td>{{'1388123412323' | date:'MM/dd/yyyy h:mma'}}</td>
- <td class="text-right">
- <button class="btn btn-danger" ng-click="deleteProduct(product)">X</button>
- </td>
- </tr>
- </table>
- <input type="text" required ng-model="newProduct" />
- <a href="#" class="btn btn-primary" ng-click="addProduct()">Add Product</a>
- </div>
- </body>
- </html>
- $http.get('/home/GetProducts')
- .success(function (result){
- $scope.products = result;
- })
- .error(function (data) {
- console.log(data);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement