更改文件夹位置角UI的引导模板 [英] Change the folder location for Angular ui-bootstrap templates

查看:199
本文介绍了更改文件夹位置角UI的引导模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用的用户界面,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.

这篇关于更改文件夹位置角UI的引导模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆