In my previous post, I outlined how to use ASP.NET MVC and Angular together, making certain views pure MVC and others Angular. When I first used Angular this way, I was so happy, I went the full Angular way making requests from Angular for my data. Essentially, something like this: $http({ method: ‘GET’, url: ‘/api/rest/’ }) .success(function (data, status, headers, config) { vm.names = data; }) .error(function (data, status, headers, config) {}); This is code inside my customers.js. It’s just
Tag: spa
Angular is a great tool, but it took me some time to find a way to combine it elegantly with ASP.NET MVC. This is basically how I did it. First, create a new ASP.NET MVC application. Next, install the Angular package via NuGet. Now for the customization. The objective is to use the normal ASP.NET MVC navigation, unless for certain URLs, when we’ll let Angular take over. So http://www.example.com/Account/Login would be handled by ASP.NET (“ASP.NET-mode”), but http://www.example.com/#/Customers would be handled
At Team4Talent we recently held an entire day of developer sessions. We regularly have someone give a session on an interesting topic, but always after work. This limits time somewhat. An entire day makes it possible to have multiple sessions and dive more deeply into the topics at hand.I myself gave a session on using Durandal for single page applications. Some of my colleagues are very much pro-javascript (looking at you Tim!), while others are sceptical. I hope I could