Dynamic templateUrl in directives
来源:互联网 发布:java商品交易系统 编辑:程序博客网 时间:2024/06/05 02:06
https://github.com/angular/angular.js/issues/1039
I'd like to be able to have templateUrl be configurable
eg
<my-directive templateUrl="hard-coded-path'>
Right now, this can be done via compile()
compile:function(tElement, tAttrs, transclude) { var html = $templateCache.get(tAttrs.templateUrl); tElement.html(html); },
Problem is this only works for inline template, I'd like to be able to fetch it via network if it is not available yet.
Ideally, the delayed compile function associated with templateUrl processing in Angular should be exposed to directive writers.
Very ideally, I'd like to be able to
<my-directive templateUrl="{{scope.templateUrl}}">
0 0
- Dynamic templateUrl in directives
- __attribute__ directives in Objective-C
- Input Section Directives in Assembly Code
- [JS] Use repeat and list directives in AngularJS
- Dynamic developments in Java
- Dynamic Equivalence in Translating
- Dynamic Lightmaps in OpenGL
- Dynamic Invocation in Scala
- Dynamic Updates in the DNS/ Dynamic DNS
- Correlation Directives -> Directives
- angular自定义指令templateUrl
- Using dynamic instantiation In Hibernate
- dynamic structure in OO ALV
- using dynamic library in c++
- Dynamic Array Implementation in Java
- Managing Dynamic Objects in C++
- Dynamic Class Loading in Java
- Dynamic coding in Objective C
- MySQL的经典用法
- SVN服务器常见错误
- python学习之9 日志记录logging
- Linux学习之源码2:start_kernel流程
- PAT1013
- Dynamic templateUrl in directives
- LZW压缩与解压
- GCD的相关东东
- C# 滚动条应用总结
- C# richTextBox TextBox赋值失败的奇葩问题
- 1039. 到底买不买(20)
- flask+heroku环境搭建(windows)
- dataTables 添加行内操作按钮
- 【Linux运维-集群技术进阶】Nginx+Keepalived+Tomcat搭建高可用/负载均衡/动静分离的Web服务器集群