This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Description
I am currently running into this exact issue
http://stackoverflow.com/questions/12006326/angularjs-templateurl-defers-construction-of-controller-dependent-code-breaks
I created an plunker
http://plnkr.co/edit/mTMQHEILCRkc8uwBMuy8?p=preview
that appears to show everything ...working. However I am unable to reproduce this success in my application. Both versions of angularjs match (1.0.3) so my only guess is that templateUrl: 'foo.html' in plunker is not an accurate mechanism of my local server app's templateUrl: '../../parts/map/map.html'.
To be clear, in my app, if I inline the template templateUrl: '../../parts/map/map.html' then everything is totally fine.
Inline template: Works

External template: Error

One thing that struck me is the order of logging is different in the Error version: map controller fn comes AFTER map-marker link fn whereas when its working map controller fn comes BEFORE map-marker link fn.
Did I find a bug in angular or my head?