I\'m trying to fire the foo() function with the @click but as you can see, need press the radio button two times to fire the event correctly . Only
foo()
@click
This happens because your click handler fires before the value of the radio button changes. You need to listen to the change event instead:
click
change
//here
Also, make sure you really want to call foo() on ready... seems like maybe you don't actually want to do that.
ready:function(){ foo(); },