Object JavaScript Control Flow Bindings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Control Flow Bindings</title> | |
</head> | |
<body> | |
<label> | |
<input type="checkbox" data-bind="checked: displayMessage" /> | |
Display message</label> | |
<div data-bind="if: displayMessage">There's something important here.</div> | |
<script src="Scripts/knockout-2.2.1.debug.js"></script> | |
<script> | |
ko.applyBindings({ | |
displayMessage: ko.observable(false) | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment