Skip to content

Commit

Permalink
Added minimal documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Hunter Loftis committed Apr 3, 2011
1 parent c27b845 commit 840a02d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
- Loosely coupled architecture
- Dynamic binding
- Data-bound controls and modules

# How to use

- Include knockout
- Include knockout.namespaces
- Create namespaced bindings in your html view:

# Use

<script src="knockout-latest.js"></script>
<script src="knockout.namespaces-latest.js"></script>
...
<span data-bind-user="text: name">
<span data-bind="text: title"> <!-- works alongside non-namespaced bindings -->

- Call ko.applyBindings with a namepace:

ko.applyBindings(userViewModel, 'user');
...
<script>
ko.applyBindings(globalViewModel);
ko.applyBindings(userViewModel, 'user');
</script>

0 comments on commit 840a02d

Please sign in to comment.