SteveSanderson/knockout — Issue #283: Request: support else binding
Author: wachunga
Created: 2012-01-16 18:47:27+00:00
State: open

I just transitioned a modest-sized project from jquery.tmpl to KO's native templates.

The largest pain point I encountered was the loss of ```{{else}}```. Sometimes ```if``` and ```ifnot``` are not enough. Here's a simple example:

```

```

Accomplishing this with ```if``` and ```ifnot``` is possible but a not very readable. In such cases, I instead resorted to dynamic template bindings with a single template for each case. Proper else support in KO would be much nicer:

```

```