Single Page Apps (SPA) are becoming many SharePoint and .NET developers favorite way to build applications. There are many great frameworks to aid in the process, but one of my favorites is Durandal. Durndal itself relies on some other very well known libraries, such as Knockout, Require.js, and jQuery. Here I will show how to create a Durandal based SPA that can be deployed into SharePoint as a SharePoint-hosted app. This means all code will live client side and we will not need any access to the server or server side code.
The source code for everything we do here is posted at the bottom, so go ahead and grab that if you want it.
###Building and Understanding SharePoint-hosted apps
Open Visual Studio 2013 and create a new project. Create a C# project with the .NET Framework 4.5. I will be creating an expense report manager to demonstrate the capibilities of a SPA in SharePoint, so I named my project ReportManager.