我有一个类似列表的容器指令,可以将内容转换为ng-repeat.
模板看起来像这样:
用法看起来像这样
foo
这按预期工作.但是,只要我的模板中的ng-repeat上面有任何指令,例如
我的代码抛出
"Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element:"首先看一下Angular代码,看起来Angular没有正确地将$ transclude注入设置到ngTransclude控制器中.我将开始挖掘Angular代码,试图找出原因,但如果有人已经知道发生了什么和/或如何解决或解决它,我将非常感激.
以下是积极案例的全功能小提琴:http://jsfiddle.net/7BuNj/1/
对于否定案例,这是一个完全无功能的小提琴:http://jsfiddle.net/8BLYG/
撰写答案