Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Object JavaScript - Knockout Control Flow using with binding
<!DOCTYPE html>
<html xmlns="">
<h1 data-bind="text: product"></h1>
<p data-bind="with: warehouse">
Warehouse Location: <span data-bind="text: location"></span>,
Quantity Available: <span data-bind="text: quanAvail"></span>
<script src="Scripts/knockout-2.2.1.debug.js"></script>
<script type="text/javascript">
product: "Widget",
warehouse: {
location: "3D1",
quanAvail: 6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment