|
@@ -0,0 +1,65 @@
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
+<html ng-app='MyApp'>
|
|
|
|
+<head>
|
|
|
|
+ <meta charset="utf-8">
|
|
|
|
+ <title>My To Do Angular</title>
|
|
|
|
+ <link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
|
|
|
|
+</head>
|
|
|
|
+<body>
|
|
|
|
+ <!-- <div ng-controller='Main' class="container">
|
|
|
|
+ <div class="page-header">
|
|
|
|
+ <h1>Seleznev Do IT</h1>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="content">
|
|
|
|
+ <input type="numder" ng-model='value'> {{value * 3}}
|
|
|
|
+ <input type="text" ng-model='item'>
|
|
|
|
+ <button ng-click='addItem()'>Add</button>
|
|
|
|
+ <ul>
|
|
|
|
+ <li ng-repeat='list in lists track by $index'>{text}<button class="btn-danger" ng-click='deletItem($index)'>X</button></li>
|
|
|
|
+ </ul>
|
|
|
|
+ <label>width</label>
|
|
|
|
+ <input type="numder" ng-model='style.width'>
|
|
|
|
+ <label>height</label>
|
|
|
|
+ <input type="numder" ng-model='style.height'>
|
|
|
|
+ <label>background</label>
|
|
|
|
+ <input type="text" ng-model='style.background'>
|
|
|
|
+ <div ng-style='{width: style.width + "px", height: style.height + "px", background: style.background}'></div>
|
|
|
|
+ </div>
|
|
|
|
+ </div> -->
|
|
|
|
+
|
|
|
|
+ <div ng-controller='BooksList' class="container">
|
|
|
|
+ <div class="page-header">
|
|
|
|
+ <h1>Books</h1>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="page-boody">
|
|
|
|
+ <input type="text" ng-model='searchString' placeholder="Filter" class="form-control">
|
|
|
|
+ <table class="table-bordered table-hover container">
|
|
|
|
+ <thead>
|
|
|
|
+ <td ng-click='sortBy("title")'><i class="glyphicon" ng-class='{"glyphicon glyphicon-chevron-up": sortFild === "title", "glyphicon glyphicon-chevron-down": sortFild === "-title"}'></i>Title</td>
|
|
|
|
+ <td ng-click='sortBy("author")'><i class="glyphicon" ng-class='{"glyphicon glyphicon-chevron-up": sortFild === "author", "glyphicon glyphicon-chevron-down": sortFild === "-author"}'></i>Author</td>
|
|
|
|
+ <td ng-click='sortBy("date")'><i class="glyphicon" ng-class='{"glyphicon glyphicon-chevron-up": sortFild === "date", "glyphicon glyphicon-chevron-down": sortFild === "-date"}'></i>Date</td>
|
|
|
|
+ <td ng-click='sortBy("cost")'><i class="glyphicon" ng-class='{"glyphicon glyphicon-chevron-up": sortFild === "cost", "glyphicon glyphicon-chevron-down": sortFild === "-cost"}'></i>Price</td>
|
|
|
|
+ <td ng-click='sortBy("rate")'><i class="glyphicon" ng-class='{"glyphicon glyphicon-chevron-up": sortFild === "rate", "glyphicon glyphicon-chevron-down": sortFild === "-rate"}'></i>Rate</td>
|
|
|
|
+ <td></td>
|
|
|
|
+ </thead>
|
|
|
|
+ <tbody>
|
|
|
|
+ <tr ng-repeat='item in books | orderBy:sortFild | filter: searchString'>
|
|
|
|
+ <td>{{item.title}}</td>
|
|
|
|
+ <td>{{item.author | uppercase}}</td>
|
|
|
|
+ <td>{{item.date | date: 'longDate'}}</td>
|
|
|
|
+ <td>{{item.cost}}</td>
|
|
|
|
+ <td>{{item.rate | number : 1}}</td>
|
|
|
|
+ <td>
|
|
|
|
+ <button class="btn btn-danger" ng-click='deleteBook(item.id)'></button>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ </tbody>
|
|
|
|
+ </table>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <script type="text/javascript" src="./node_modules/angular/angular.js"></script>
|
|
|
|
+ <script type="text/javascript" src="app/app.module.js"></script>
|
|
|
|
+ <!-- <script type="text/javascript" src="app/controllers/main.controller.js"></script> -->
|
|
|
|
+ <script type="text/javascript" src="app/controllers/books-list.controller.js"></script>
|
|
|
|
+</body>
|
|
|
|
+</html>
|