What is the best way to hide the screen while knockout js bindings are being built?

后端 未结 4 479
渐次进展
渐次进展 2020-12-12 13:34

I\'m a huge knockoutjs fan. I use it for all my web development now and simply love it. One thing that I\'ve not been able to figure out though is how to hide the UI while t

4条回答
  •  孤街浪徒
    2020-12-12 14:12

    There are a couple of strategies that you can use here.

    -One is to place all of your actual content into templates that live in script tags (does work fine with native templates). Within the template, you can then use control-flow bindings. This would be like:

    -Another choice is to use style="display: none" on the container element along with a visible binding that can be tied to a loaded observable where you change the observable to true after the bindings have been applied.

提交回复
热议问题