Movatterモバイル変換


[0]ホーム

URL:


 

Getting started

  1. How KO works and what benefits it brings
  2. Downloading and installing

Observables

  1. Creatingview models withobservables
  2. Working withobservable arrays

Computed observables

  1. Usingcomputed observables
  2. Writable computed observables
  3. How dependency tracking works
  4. Pure computed observables
  5. Reference

Bindings

Controlling text and appearance

  1. Thevisible andhidden bindings
  2. Thetext binding
  3. Thehtml binding
  4. Theclass andcss bindings
  5. Thestyle binding
  6. Theattr binding

Control flow

  1. Theforeach binding
  2. Theif andifnot bindings
  3. Thewith andusing bindings
  4. Thelet binding
  5. Thecomponent binding
  6. Binding lifecycle events

Working with form fields

  1. Theclick binding
  2. Theevent binding
  3. Thesubmit binding
  4. Theenable anddisable bindings
  5. Thevalue binding
  6. ThetextInput binding
  7. ThehasFocus binding
  8. Thechecked binding
  9. Theoptions binding
  10. TheselectedOptions binding
  11. TheuniqueName binding

Rendering templates

  1. Thetemplate binding

Binding syntax

  1. Thedata-bind syntax
  2. The binding context

Creating custom bindings

  1. Creating custom bindings
  2. Controlling descendant bindings
  3. Supporting virtual elements
  4. Custom disposal logic
  5. Preprocessing: Extending the binding syntax

Components

  1. Overview: Whatcomponents andcustom elements offer
  2. Defining and registering components
  3. Thecomponent binding
  4. Using custom elements
  5. Advanced: Custom component loaders

Further techniques

  1. Loading and saving JSON data
  2. Extending observables
  3. Deferred updates
  4. Rate-limiting observables
  5. Unobtrusive event handling
  6. Usingfn to add custom functions
  7. Microtasks
  8. Asynchronous error handling

Plugins

  1. Themapping plugin

More information

  1. Browser support
  2. Getting help
  3. Links to tutorials & examples
  4. Usage with AMD using RequireJs (Asynchronous Module Definition)

Downloads

Get the latest stable production build of Knockout.js:

Also available:debug build.Note: This is only intended to help you understand how Knockout works. Don't use it for normal application development, because it exposes additional unsupported private APIs.

Bower

Knockout is available through theBower package manager. Learn more about using and installing Bower athttp://bower.io. To add Knockout to your application, you can run:

bower install knockout

Additionally, you can include the--save option to add knockout to yourbower.json file.

Installation

Simply reference the JavaScript file using a<script> tag somewhere on your HTML pages. For example,

<script type='text/javascript' src='knockout-3.5.1.js'></script>

Of course, update thesrc attribute to match the location where you put the downloaded file. Next, if you’re new to Knockout, get started withinteractive tutorials, see somelive examples, or dig into documentation aboutobservables.

Content Delivery Networks (CDNs)

To give your users the fastest download speeds, you might instead prefer to referenceknockout.js on one of the following third-party CDNs:

Archive of all versions

Related files

  • jquery.tmpl (debug) — the old jQuery Templates plugin sometimes used with older versions of Knockout.js. This approach to templating has been deprecated since Knockout v2.0.0.
(c) knockoutjs.com

[8]ページ先頭

©2009-2026 Movatter.jp