ng执行顺序
- app.config()
- app.run()
- directive's compile functions (if they are found in the dom)
- app.controller()
- directive's link functions (again, if found)
http://hellobug.github.io/blog/angularjs-directive-2-compile-vs-link/
http://hellobug.github.io/blog/angularjs-directive-2-compile-vs-link/