Hoppa till huvudinnehållet

Bind @var HTMLElement inside of a nested template?

Kommentarer

1 kommentar

  • Yona Bystedt
    Hi Marc,

     

    It is unfortunately not possible to create @var bindings inside a templated collection like this.To get a reference to the templated items you can use jQuery to select the items with the ids that have been bound in the collection: var textInput = $("#" + layerItem.uiID, this.root) If this code is in the view you can constrain the selector with 'this.root' to make it more efficient and avoid accidentally selecting anything you don't want.

     

    Hope this helps,

     

    Jonathan

     

     
    0

Du måste logga in om du vill lämna en kommentar.