Phi: add helper makeObservablesForAllProperties
call ko.utils.knockprops.makeObservablesForAllProperties( self ); to create an observable() for every bridged property
This commit is contained in:
parent
fd3a5d240a
commit
e0c88ccdbc
1 changed files with 10 additions and 0 deletions
|
@ -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.get = function(target, prop) {
|
||||
|
|
Loading…
Reference in a new issue