TypeScript and Knockout binding to 'this' issue - lambda function needed?

后端 未结 8 1630
被撕碎了的回忆
被撕碎了的回忆 2020-12-04 18:28

I\'ve been creating a htmlHelper function using TypeScript and KnockoutJS to edit a list of emails.

The list of emails is a Knockout ObservableArray called e

8条回答
  •  眼角桃花
    2020-12-04 18:56

    I was inspired by the bind answer and came up with this, I think it a little easier to read.

    Delete

    Wrap the method in a lambda/anonymous function. Don't forget the ().

提交回复
热议问题