Durandal samples translated to TypeScript