摘要: directive是如何被compiled HTML编译发生在三个阶段: 1.$compile遍历DOM节点匹配directives 如果compiler找到元素上的directive,directive就会被加入匹配DOM元素的directives list列表中,一个元素可以有多个directi 阅读全文
posted @ 2016-05-17 18:17 echo2016 阅读(512) 评论(0) 推荐(0) 编辑
摘要: 一般来讲 directive名字遵循一下规则: 1.忽略以x-和data-为元素/属性的前缀 2.转化“:”,“-”,“_”命名为驼峰命名 如下所示 transclude makes the contents of a directive with this option have access t 阅读全文
posted @ 2016-05-17 14:20 echo2016 阅读(291) 评论(0) 推荐(0) 编辑