safaribook-knockout-essentials/ko-cart/index.html

65 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>KO Shopping Cart</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<!-- our app goes here -->
<h1>Product</h1>
<div>
<strong>ID:</strong>
<input
class="form-control"
type="text"
data-bind="value:product.id"
/><br />
<strong>Name:</strong>
<input
class="form-control"
type="text"
data-bind="value:product.name"
/><br />
<strong>Price:</strong>
<input
class="form-control"
type="text"
data-bind="value:product.price"
/><br />
<strong>Stock:</strong>
<input
class="form-control"
type="text"
data-bind="value:product.stock"
/><br />
</div>
<div>
<strong>ID:</strong>
<span data-bind="text:product.id"></span><br />
<strong>Name:</strong>
<span data-bind="text:product.name"></span><br />
<strong>Price:</strong>
<span data-bind="text:product.price"></span><br />
<strong>Stock:</strong>
<span data-bind="text:product.stock"></span>
</div>
</div>
</div>
</div>
<!-- vendor library -->
<script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/knockout-3.2.0.js"></script>
<!-- app -->
<script type="text/javascript" src="js/models/product.js"></script>
<script type="text/javascript" src="js/viewmodel.js"></script>
</body>
</html>