
knockout
sunxboy
这个作者很懒,什么都没留下…
展开
-
select2 集成knockoutjs
1. execute scripts when page loading: ko.bindingHandlers.select2 = { init: function(element, valueAccessor, allBindingsAccessor) { var options = ko.toJS(valueAccessor()) || {}; ...原创 2014-12-31 09:36:15 · 224 阅读 · 0 评论 -
十个有用的knockout binding用法
Knockout.js is a very powerful library to build interactive web applications in. The creators of knockout tried really hard to keep it as light-weight as possible (and for good reason). That being sa...原创 2015-01-07 15:18:30 · 300 阅读 · 0 评论 -
knockoutjs 3.2 模块化开发笔记
npm install yo -g npm install generator-ko -g yo xxxx --> type: yyyy --> type: 1 add a component: yo ko:component zzzz # generate dist folder: gulp原创 2015-01-14 17:03:49 · 206 阅读 · 0 评论 -
使用define 或者 require 加载knockout.mapping 时找不到fromJS问题解决
问题: define(['knockout', 'knockout.mapping'], function(ko, mapping) { } 当使用ko.mapping.fromJS/时总是报fromjS无效方法。 原因是: It sounds like Script# is assuming that ko and ko.mapping are in the global name...原创 2015-01-26 13:29:53 · 323 阅读 · 0 评论 -
knockout js basic technology
1. how to push all list into observal array self.inverters = ko.observableArray([]); self.loadInverters = function(inverters) { var array = self.inverters(); ko.utils.arrayPushAll(array, inver...原创 2014-11-27 11:33:35 · 105 阅读 · 0 评论