How can I postpone rendering until a model is fetched in Marionette? I can listen to change event on the model, but then it will be rendered twice. Is there an elegant solution?
Manager.module 'Views', ( Views, App, Backbone, Marionette, $) ->
class UserDetail extends Marionette.ItemView
template: 'manager.users.detail'
initialize: =>
@model = new App.Models.ManagerUser( )
return
onBeforeRender: =>
@username = 'test' # Comes from URL
@model.fetch()
return
serializeData: ->
data = @model.toJSON()
return data