angularjs - Augmenting controller with events -


i writing single page web application parties producing company.

my goal create "office like" application allow users open new "party document " , edit it.

each document have lot of "content pages" (like food , utilities, attractions ,suppliers etc...) , in each page there many fields.

each field have own restrictions should occure when being added , removed or edited.

i wanted make base javascript object other fields object inherit . looks :

`

function rootcomponent(name,value){     this.name = name;     this.value = null;      // logic restrictions methods     this.onchange = null;     this.afterchange = null;     this.oncheck = null;     this.ondelete = null;     this.afterdelete = null;     this.onadd = null;         // ensure got value     if (value !== undefined){         this.value = value;     } } 

`

my question how should augment events of "onchange" , such angular's $watch system.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -