2

How can I force complete re-render of a template with knockout.js 1.3.0 beta

I have succesfully done this with 2.1, using jquery template's {{each}} like this answer

But since 1.3.0 does not use jquery templates anymore how can i do it?

Is there any equivalent for {{each}} in native knockout templating without using data-bind

Community
  • 1
  • 1
Carlos Muñoz
  • 17,397
  • 7
  • 55
  • 80

1 Answers1

6

Call .valueHasMutated(); on the observable that contains the data you wish to re-render. This tells knockout that it needs to consider the data as modified and therefore needs to be re-rendered.

This also works great on jquery template sections also

photo_tom
  • 7,292
  • 14
  • 68
  • 116