Complex communication between multiple AngularJs directives

Complex communication between controllers and directives (and child directives) is a common problem or challenge in large AngularJs applications (and all large MVVM applications in my opinion).
It becomes even more complicated when you have to communicate with a directive, that has an isolated scope, within a directive that has another isolated scope.

Communication with an isolated scope

When I create a directive that has an isolated scope, AngularJs provides three ways of communicating with it. I can pass in a string variable (@). I can pass in an object with two-way binding (=). Or i can pass in an external function

Living as a Professional Passionate Programmer

I've been meaning to write a post about my thoughts, feelings and emotions I experience in my life as a 'professional passionate programmer'. So if you were expecting a technical post today, sorry to disappoint :)!

I tend to write in the 'we' form, which is just how I like to write. I don't mean to define you -the reader- as who I am, you are who you are. But you might recognize yourself in this words, and you might not. But I do hope you enjoy reading it.

So, enough formalities, let's just get on with it :).

Information madness


Angular's 'Unkown Provider' problem after deployment

We've all been there at some point. Your app works great on your machine, all features are ready to be pushed to dev/acc, and when you do, all hell breaks loose.

Specific to Angular apps, the following error gets thrown a lot after you minify your JavaScript:

Unknown provider: eProvider <- e

And you'll be like 'What eProvider, who put it there, where did that come from?' :). Don't worry, we've all been there at one point.

This problem will occur when the injector service is not able to retrieve an implementation that you requested in your module.

Prerender AngularJs templates with MVC HTML helpers

As a .NET Web developer, I'm always looking for better ways to get Angular and MVC.NET to play nicely together. Writing and rendering templates using the templateCache is a good example of these two world that tend to collide if not implemented correctly.


Best Practice: Unless your template is very small, it's typically better to break it apart into its own HTML file and load it with the templateUrl option.

So this is not recommended:

directive('toggleButton', function () {
    return {
        replace: true,
        template: '<div style="float:left; cursor:pointer;">' +
                    /* ...Template Html ...  */ 

IIS URL Authorization, Forms authentication and the 401.2 error

I recently experienced a confusing, head-ache-causing problem while deploying an MVC application to a Windows Server 2008.
The issue looked simple enough: the Web server returned a 401 (unauthorized) error when I tried to access the application, which required Forms Authentication to function properly.

Analyzing the issue

I started out with the basics. Check the anonymous and forms authentication settings, check the AppPool configuration, check if the AppPool user has all necessary rights, etc.

But all to no real avail. IIS kept redirecting me to the logon page (even when the session was authenticated!). Using fiddler it became more and

Member of The Internet Defense League