我想重复使用指令模板。我怎样才能在链接函数中访问它?
我期望类似的东西
this.template
最佳答案
您必须使用模板缓存服务。
$templateCache.get('path/to/template/my.html')
关于javascript - 是否可以在指令链接函数中获取模板内容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22092934/