Say we have a Batman app with a route called 'information', as defined below.
------------
class App.AppController extends Batman.Controller
routingKey: "app"
# One possible route
information: (arg) ->
# Set the value of a key, used by the view
@set 'somekey', 'somevalue'
# Wait for the DOM to be redered
@view = @render()
@view.on 'ready', =>
# Do something
$('#myelement').fadeIn(500)
-------------
This code above works well for accessing the 'information' route for the first time. However, if we then call the 'information' route for a second time, then the "@view.on 'ready'" callback doesn't seem to work correctly, i.e. the callback function is called before the page has been fully rendered.
I have confirmed this by replacing the "@view.on 'ready', =>" with "setTimeout => ... , 1000" call, and the page renders correctly.
Am I missing something?
Thanks
Andrew
--
You received this message because you are subscribed to the Google Groups "batman.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to batmanjs+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Batman.View::cache = false