Stating directive templateUrl relative to root

Looks like it’s supported. Taken from a thread on AngularJS Google Group:

the url with “https://stackoverflow.com/” prefix is relative to the domain, without the “https://stackoverflow.com/”
prefix it will be relative to the main (“index.html”) page or base url
(if you use location in the html5 mode).

This works fine:

templateUrl: '/Scripts/app/templates/personalDetails.html'

Leave a Comment