Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
directive templateUrl gives to No Controller Error #1903
I am currently running into this exact issue
I created an plunker
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
To be clear, in my app, if I inline the template
Inline template: Works
External template: Error
One thing that struck me is the order of logging is different in the Error version:
Did I find a bug in angular or my head?
I have the exact same problem. So it's probably not in your head :).
I'll try to make a Plunker later.
Edit : here's my plunker
If you uncomment line 23 of app.js and comment line 22, then there's no more error and everything works fine.
Looks like it's working in
If this is still a problem and you can provide a broken demo on
I'm having trouble reproducing this, but I think the most likely thing that would cause this (in a modern build) is manually $compiling nodes without making use of the cloneConnectFn, which would cause the HTML compiler to not find the parent directives.
http://plnkr.co/edit/jqmhKsmLNr9DCAMkQJUz?p=preview here's an example, tested in a few builds (snapshot, 1.2.5 and 1.0.3), as far as I can tell this is always working as expected