angularjs - How do i create my own watch function similar to angular in javascript -


i big fan of angular , loves two-way binding concept , watch functionality.but present firm using backbone stack , not find way include angular js backbone stack. (if there way . , good)

i want ui manipulation based on value change of simple variable.(need not object).

and if possible want extend object 1 level deep like

 var watchobj = {    variable1 : 1,    variable2 : 2  } 

if of key-value pair change want ui manipulation(depending on key ).

how can achieve minimum possible javascript code.

i not recommend including angular backbone , if use backbone stack should go through tutorial (http://backbonejs.org/). maybe find things done without two-way data binding concept (http://backbonejs.org/#faq-why-backbone).

if man 'vanilla js' no framework @ all, should check object.observe functionality (https://developer.mozilla.org/en-us/docs/web/javascript/reference/global_objects/object/observe) not supported yet enough use in production (http://caniuse.com/#feat=object-observe) - , thats why there many mvc frameworks different concepts doing same in end:)


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -