     @emit 'beforeRender', {sender: @}
     render @viewPath(), @, (html) =>
       selector.html(html)
+      @_isRendered = yes
       do @onAfterRender
       @emit 'afterRender', {sender: @}
 


  # Called when the view controller is detached from a parent view controller
  onDetach: ->

  constructor: (params = {}, routedUrl = "") ->
    @params = _.defaults(params, @defaultParams)
    @routedUrl = routedUrl
    @_isRendered = no
    # bind all methods to self
    for key, value of @
      if _.isFunction(value) and value != @constructor
