阅读背景:

使用属性指令获取元素的子元素

来源:互联网 

I have a directive that is restricted to attribute. I want to do either of 2 things. If a certain condition is met, I want to use the children for the element with the directive attribute as the model (thats the content) or if that condition is not met then I want to data bind from a service instead, so the directive would replace the children with something i was given. I have a directive that is doing the latter but Im finding it very hard to have it grab the children before the compiler comes in and replaces it with its template... Anyone know how this is done if its possible?I have a directive that is restricted to attrib




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: