river.core.model
is riverjs core module. It's response for compare old value and new value. all thescope
object is instance of it.
apply()
once you call
scope.apply
, the model compare system will be startup to find which value has been changed.Once find any changes happend, model will sync view and module scope.
onchange(key,function(newvalue,oldvalue){ })
once
key
inscope
changed , thecallback
will be trigger, the newvalue and oldvalue will be passed in as arguments