last day (14 days later) » 

14:45
Hi.
if so , so why <input ng-model="aa"/> {{aa}} works without ng-change ?
I was expecting that each keystrokes , it will be also evaluated
because it automatically updates when there is a keypress
in your example, you're setting tb3 = tb1 + tb2 once before there is a value assigned to either variable
you can do {{parseInt(tb1)+ parseInt(tb2)}} just fine
but even if I fill tb1 and tb2 , I still don't see tb3
yeah, because it's happening before there is a value assigned to them
MMM I mean that even if I click numbers in tb1 and tb2 - i still dont see tb3
the code is executing before there is a value though
so tb3 will always be NaN
14:51
in the first phase - yes it should be NaN becuase there are no numbers
but if later I click 1+2
and then 1+5 , then it should show me result of previous cycle....no?
hmm, not sure what you're asking
at first it is NAN
later tb1=1
tb2=2
the code is executed only one time, so even if you update the value, it won't matter?
-
Good.
then why does this code execute one time but this one <input ng-model="aa"/> {{aa}} is every key press ?
(the eval of {{}})
because the template "watches" for changes in the variables
14:54
oh. So I need another function ( or to use ngchange or {{a+b}} in order for tb3 value to be shown
or to use watch
yeah
or you can just do something like this: jsbin.com/jutoxuruko/1/edit?html,css,js,output
it also works without parseInt
Ok thank you for your time and help

last day (14 days later) »