Async functions with AngularJS

AngularJS allows to define async functions. An example is the $http service. HTTP service calls an API and returns a response as a promise.

Retrieve the result from the Promise object using then function. The function has two arguments:

Javascript inheritance in Knockout ViewModels

Knockout provides an elegant way of updating the user interface using Javascript View models. Javascript has an inheritance model. With that, we can create a hierarchy of classes. Consider the following HTML with Knockout bindings.

We use a simple