Error: $compile:tpload Failed To Load Template Http Status : 404
Solution 1:
I guess it was because you wrote template: 'views/templates/addlist-modal.html'
instead of templateUrl: 'views/templates/addlist-modal.html'
Solution 2:
Error: [$compile:tpload] Failed to load template:xyz.html(HTTPstatus:404NotFound)
can be caused by below setting in web.config
<system.webServer><handlers><removename="BlockViewHandler"/><addname="BlockViewHandler"path="*"verb="*"preCondition="integratedMode"type="System.Web.HttpNotFoundHandler" />
This causes to block any direct request to the file in Views directory. Angular xhr request to this file is blocked by this.
Comment it out and see if things work. Use this with caution as it allows access to your files.
Solution 3:
I just pasted your directive into my working app and it ran fine. Did you stop and start grunt? Note on page 16 might explain why the directory wasn't picked up dynamically.
Solution 4:
Late to the party, but might be useful to some. In my case it was because of difference in letter casing in the url of the directive and the $templateCache: The path in the directive:
templateUrl:'somedirectory/somefile.html'
The path in $templateCache:
$templateCache.put('someDirectory/somefile.html', 'html template here...');
HTH someone.
Post a Comment for "Error: $compile:tpload Failed To Load Template Http Status : 404"