Availability of UI elements in Marionette.View

前端 未结 3 1497
予麋鹿
予麋鹿 2021-02-13 11:47

I\'d just like to understand the decisions behind Backbone.Marionette\'s view regarding UI elements. When instantiating a Marionette.View on an existing DOM element, like this:<

3条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-13 12:03

    I think you have that problem because you have to access to the jQuery element with

    this.ui.whatever
    

    Because "this" is already a view instance. See: http://marionettejs.com/docs/v2.4.4/marionette.itemview.html#organizing-ui-elements

提交回复
热议问题