Brian M Hunt

Results 223 comments of Brian M Hunt

Incidentally, somewhat related — [TKO](/knockout/tko) is in Alpha-3 now. I'd be interested in feedback on it in general, particularly as a drop-in replacement (i.e. backwards compat.) with ko 3.4 in...

@BooleT37 Indeed. Modularization is why I rewrote Knockout as [TKO](/knockout/tko) with ES6 modules.

I posted an answer here that might give some insight, too: #2374

With a preprocessor like knockout.punches it might work with something like: ``` django {{ #if: X }} {{ else }} {{ /if }} ``` where `{{ else }}` is converted...

Hmm. I am mulling how one mind deal with the following using the above: ``` {{ #if: X }} {{ #if: Y }} {{ /if }} {{ else }} {{...

**EDIT** The [a jsFiddle: Knockout Else Binding](http://jsfiddle.net/bmh_ca/hyrvtps4/) now appears to work as expected. It's just an alternative or complement to altering the `if` binding as @mbest proposed above. I have...

@jods4 You can essentially accomplish this now with the [knockout-switch-case](https://github.com/mbest/knockout-switch-case) plugin. Not to take away from the usefulness of accessing the initial contents of components' nodes, but the switch/case itself...

I created a plugin [knockout-else](https://github.com/brianmhunt/knockout-else) that solves the _else_ problem in the way I described in my comments above. With some unit tests for good measure. @mbest, could this plugin...

I have since added "inline" else/else-if bindings to `knockout-else` i.e. the following ought to work as expected: ``` html X Y Z ```

This is in [tko](https://github.com/knockout/tko) now, as both the `else` binding (like [knockout-else](/brianmhunt/knockout-else)) plus `` inside of an `if/ifnot/unless`.