Peter Morlion logo

Testing Knockout with Mocha and without a browser

I’ve recently been adding Knockout to an ASP.NET MVC application. I would consider Knockout a previous-generation solution and would prefer to use a full-fledged SPA framework like Aurelia, but that’s a bit out of scope for the moment. After introducing Knockout, I wanted to add unit tests on my viewmodels with Mocha. I had some […]

“String expected” error with Knockout in IE10

If you switched to **IE10 **and your Knockout bindings that previously worked in IE (8 in my case) now give you the following error: "String expected", you might want to check your bindings. Mine had a computed ‘toString’ member. I’m not sure what’s happening but choosing the name of an existing, default member might not […]

KnockoutJS foreach binding and an old-school ASP.NET Repeater

Stuck with ye olde ASP.NET Webforms? It doesn’t mean you have to miss out on all the good javascript fun (which is, in fact, also an old technology). At my current client (being a consultant and all), we have carefully introduced Knockout.js for the more complex screens. To be honest, it’s only used in two […]

KnockOutJs custom bindings and data-attributes in a dropdown

At the day-job, we (finally!) get to use Knockout in our old-school WebForms application, albeit on one page to begin with (which is fine; one step at a time). If you’re not familiar with Knockout, check out their site and great documentation. If you have a Pluralsight account, even better! They have an excellent course […]