angularjs’指令的编译函数有两个函数:preLink和postLink。
Pre-linking function
Executed before the child elements are linked. Not safe to do DOM transformation since the compiler linking function will fail to locate the correct elements for linking.
Post-linking function
Executed after the child elements are linked. It is safe to do DOM transformation in the post-linking function.
它告诉我们在preLink不应该做什么,我不知道什么和什么时候应该使用preLink?在大多数时间我只是使用postLink。有什么情况下我们必须使用它吗?