I am currently stating templateUrl relative to the current window location.
cvApp.directive('personalDetails', function () {
return {
restrict: 'A',
templateUrl: '../../Scripts/app/templates/personalDetails.html'
};
});
How can I make templateUrl relative to root of the application? I am looking for something like this:
templateUrl: '~/Scripts/app/templates/personalDetails.html'
Can AngularJS accomplish this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…