angularjs - Why are my Angular, absolute path, URL's not compiling properly with Closure Compiler? -


take following example directive:

.directive("mydirective", function() {     return {         restrict: "a",         templateurl: "/my/absolute/path.tmplt.html",         controller: ...do controller stuff...     } }); 

this runs through closure compiler without error. however, when loading app greeted 404 tries load full /my/absolute/path.tmplt.html path. removing leading '/' resolves problem. problem ng-include(src="'/my/url'"), ng-controller="myctrl") located in html files , suspect anywhere reference url.

so why absolute paths fail while relative ones work fine?

you have invalid path specified. if current page asdf.com/boo/yourpage try going asdf.com/my/absolute/path.tmplt.html should see 404.

this not related angular or google closure , related folder structure + server configuration.


Comments

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -