BlueSpire/Durandal — pull request #343 by t-nelis (2013-10-17 12:40:40+00:00)
Title: Support for observable titles

This allows developers to use Knockout Observables for their module titles in routing maps.

Our use-case requires it because we localize these module titles, and switching languages in our approach involves using observables to dynamically modify translated strings (including titles).

While this works out of the box, the router function responsible for setting the document title (`updateDocumentTitle`) didn't attempt to determine if the module title was observable or not, and hence would systematically assign it directly instead of calling it as an observable function to read the underlying value. The browser would then display the Knockout JavaScript code in the window title bar (and everywhere else) instead of the actual value.

The patch also subscribes a function to update the title when any observable module title is updated.