1
0
Fork 0

Phi: add helper makeObservablesForAllProperties

call ko.utils.knockprops.makeObservablesForAllProperties( self );
to create an observable() for every bridged property
This commit is contained in:
Torsten Dreyer 2015-11-19 12:29:41 +01:00
parent fd3a5d240a
commit e0c88ccdbc

View file

@ -175,6 +175,16 @@ define(['knockout'], function(ko) {
} }
} }
self.makeObservablesForAllProperties = function(target) {
for( var p in self.aliases ) {
if( self.aliases.hasOwnProperty(p) ) {
target[p] = ko.observable().extend({
fgprop : p
});
}
}
}
self.props = {}; self.props = {};
self.get = function(target, prop) { self.get = function(target, prop) {