Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Knockout.jsの概要

 Knockout.jsの概要

Knockout.jsの概要 (3つのMVC系人気フレームワーク、Backbone.js/AngularJS/Knockout.js) - Build Insider Offline #1

Sample Code: http://mayuki.github.io/Sample/BuildInsiderOffline-1/
PDF: http://sdrv.ms/11qcEWc
PowerPoint: http://sdrv.ms/15GZzfu

Mayuki Sawatari

June 08, 2013
Tweet

More Decks by Mayuki Sawatari

Other Decks in Programming

Transcript

  1. var

  2. var ' ' var ' ' var function return //

    => 'S' // value1 ’S’ // => S
  3. var ' ' // var ' ' var function return

    function // => ' ' // observable // ‘ ’ ' ' // // =>
  4. View Model JavaScript function ViewModel () { this.lastName = ko.observable('

    '); this.firstName = ko.observable(' '); this.fullName = ko.computed(function () { return this.lastName() + this.firstName(); }, this); }
  5. HTML (data-bind ) div id target input type text data-bind

    value: lastName input type text data-bind value: firstName span data-bind text: fullName /span div
  6. DOM