I have a proposal to extend events binding syntax with following:
'change on @countrySelect!': ->
Event with ! on the end of declaration, should be triggered right after binding.
This should be helpful for events like:
'resize on window!':->
@block.width $(window).width() / 2
or
'change on @countrySelect!': ->
@populateCitySelect(@countries[@countrySelect.val()].cities)
for quick setup initial values.
I have a proposal to extend events binding syntax with following:
Event with
!on the end of declaration, should be triggered right after binding.This should be helpful for events like:
or
for quick setup initial values.