AndreyAkinshin / knockout-mvc

Power of Knockout.js for ASP.NET MVC
http://knockoutmvc.com
203 stars 125 forks source link

IKnockoutContext.GetIndex() not supported in complex binding expressions #48

Open shoftee opened 10 years ago

shoftee commented 10 years ago

The method KnockoutExpressionConverter.VisitMethodCall(MethodCallExpression) needs to check if the called method is IKnockoutContext.GetIndex(), compile it to a lambda, execute it to retrieve the index binding, and return it from the visitor method. This should allow complex binding expressions to support GetIndex().