Weitere ähnliche Inhalte
Kürzlich hochgeladen (12)
Knockout.js x linq.js のご紹介
- 11. 重要
linq.jsをつかうと・・・(ViewModel)
var MainViewModel = function(){
var self = this;
var hash = {"a001": "javascript", "a002": "ruby", "b001": "C#"};
//1.べたなやつ
self.list = ko.observableArray(Enumerable.from(hash).toArray());
//2.prototype拡張
//Enumerable.Utils.extendTo(Object);
//self.list = ko.observableArray(hash.toArray());
}