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

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -