This sample is based on the TODO MVC Angular.js sample and the Visual Studio 2015 single-page application template, but adding:
- An ASP.NET Web API as the backend for the angular app
- Support for multiple users (including Facebook auth)
- Open TodoApp.sln using Visual Studio 2013/2015.
- Press F5 to run it. Entity Framework will create a new empty database for the app (and an
.mdf
file under theApp_Data
folder).
Note: The app was only tested in Chrome.
The solution is using:
- Created with Visual Studio 2015
- ASP.NET MVC + ASP.NET Web API 2
- LocalDB SQL Database for storing users and lists
- Angular.js
- Bootstrap 3
- Font Awesome
- Social Buttons for Bootstrap
- Solution was bootstrapped using the ASP.NET Single Page Application template.
- Removed all non-essential auth features (2-factor-auth, account lockout, password recovery, etc.).
- Web API: Configured Json formatter as default and removed XML formatter.
- Added Web API as single page app backend.
- Remove client-side support for localStorage to simplify sample.
- Added
ng-strict-di
directive and updated code to use inline array annotation. - Configured Facebook authentication.
- Added Social Buttons for Bootstrap for the FB login button.
- Fixed styles to have both bootstrap and TodoMVC styles present in the app.
- Added a test project for testing the Web API by mocking EF DbSet and ASP.NET Identity ApplicationUserManager class.
See https://github.com/johnpapa/angular-styleguide for Angular style guidelines followed.
- Use Bootstrap consistently.
- Font awesome is not working when ASP.NET bundling is enabled.
- Update the login flow to use angular and tokens (not standard MVC views).
- Autofocus on the textbox after adding a new TODO.
- Test and fix mobile responsiveness.
- Test in all browsers.
- Add more unit tests.