更改文件夹位置角UI的引导模板文件夹、模板、位置、UI

2023-09-14 23:09:01 作者:特殊的味道

我想使用的用户界面,bootstrap.min.js与外部的模板。

I am trying to use ui-bootstrap.min.js with the external templates.

我得到的错误是:

http://localhost:13132/Place/template/timepicker/timepicker.html 404 (Not Found) 

我想对于每一个页面上,为每个模板,它寻找我的模板下的:

I would like for every page, for every template, it to look for my templates under:

http://localhost:13132/js/app/template/...

但我似乎无法找到在那里我可以改变这何处指向的位置。

but I cannot seem to find where I could change the location where this is pointing to.

任何人都知道如何使这种变化?

Anyone know how to make this change?

推荐答案

这个问题 GitHub上的templateUrl不可配置。你可以在每个指令定义templateUrl属性更改

Per this issue on github, the templateUrl is not configurable. You could change the templateUrl property in each directive definition

.directive('accordion', function () {
    return {
        restrict:'EA',
        controller:'AccordionController',
        transclude: true,
        replace: false,
        templateUrl: 'template/accordion/accordion.html'
 };

但是这将是脆性的并且难以维护。不幸的是,它看起来并不像他们打算让这个配置 - 但线程是一个有趣的阅读

but that would be brittle and hard to maintain. Unfortunately, it doesn't look like they're going to make this configurable - but the thread is an interesting read.