require('river.core.model')

river.core.model is riverjs core module. It's response for compare old value and new value. all the scope 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 in scope changed , the callback will be trigger, the newvalue and oldvalue will be passed in as arguments