AngularJS Components for ASP.NET MVC Developers, Part 3: Angular Templating Fundamentals

It can be tough giving up server-side Razor templating. It’s strongly typed, looks familiar, and it just feels right. In this article I am going to show you how to take your knowledge of Razor templating and accomplish the same (and more!) on the client. Once you put in the time and get used to Angular’s way of doing things, I have a strong feeling you will never look back!
Continue reading…

AngularJS Components for ASP.NET MVC Developers, Part 2: Combining MVC and Angular Routing

My original plan for part 2 was to discuss transitioning from Razor to client-side Angular templating. Instead, I am going to move this to part 3 and address a question I answered for a developer today on the LinkedIN AngularJS Developer Group. I feel this fits better as a continuation to part 1 and I will now discuss templating in depth in part 3.

The Problem
The question posed encompasses a common scenario, MVC developers looking to incorporate Angular into their pre-existing applications. My guess is the majority of developers don’t have the luxury of working on greenfield projects, creating a complete SPA (single-page application) from scratch. Instead, you are maintaining an application and would like to harness the power of Angular for newer features, creating ‘mini-SPA’s’ within your site. So how can you get Angular client-side routing to work for part of your site but still maintain your standard server-side MVC routing for the remainder of your application? The answer is actually quite simple.
Continue reading…

AngularJS Components for ASP.NET MVC Developers, Part 1: Layouts and Views

When I started learning Angular it helped to associate server-side concepts I was familiar with in ASP.NET MVC to similar client-side Angular functionality. By building these associations I was able to more quickly fit the pieces together to start building real Angular applications. My hope is that by sharing these common concepts other .NET MVC developers can more efficiently transition into Angular development. In the first part of this series I’m going to discuss the basics of getting started with a simple layout page with views.
Continue reading…

AngularJS

AngularJS + WebAPI = A Happy Wife?

AngularJS + Web API = a happy wife? I certainly wouldn’t have fathomed it a few weeks ago but imagine this conversation:

Wife: What do you want for dinner this week?
Me: I don’t know, what do you want?
Wife: I don’t know, what do you want?

Now, I know this isn’t going to win the academy award for best dialogue but I would be willing to bet you have encountered something similar recently with a significant other or collegue. After having this conversation myself for the hundredth time, I (or my wife?) decided it was time for a little automation and MealBuilder+ was born!
Continue reading…