Home  >  Article  >  Web Front-end  >  为什么在html标签里添加ng-app就能使angular的代码识别并加载?

为什么在html标签里添加ng-app就能使angular的代码识别并加载?

WBOY
WBOYOriginal
2016-06-07 08:43:521337browse

回复内容:

这个很简单,稍微翻翻 angular 源码就知道了

angular.js/Angular.js at master · angular/angular.js · GitHub

querySelector + angular.boostrap ( 如果写到 document 上,会省略 querySelector 而更快 )

其实这个问题可以延伸出 angular 的 $compile 模块原理,不过扯开就没完没了了。。。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn