打字稿是否会转换Angular Compiler生成的转换代码

时间:2018-01-21 20:13:28

标签: angular typescript angular-compiler

我正在观看The Angular Compiler 4.0 - TOBIAS BOSCH,并且在视频的1点30分突然说AST is transformed into typescript code if we use AOT compilation or javascript code if we use JIT compilationCompilation process a snapshot of the video。现在我非常困惑,真正发生在引擎盖下的是什么?是否(.ts)首先由typescript编译器转换为js然后角度编译器进入播放或角度编译器,作业和打字稿编译器是否进入游戏?我经历了这个What does the angular compiler “compile”? ,但显然我的怀疑还不清楚?任何人都可以帮我解决这个问题吗?

1 个答案:

答案 0 :(得分:0)

  

是否(.ts)首先由typescript编译器转换为js然后角度编译器进入播放或角度编译器做作业和打字稿编译器进入播放

  • 使用AOT编译器,您有angular html -> TS (to ensure types are correct) - > JS
  • 使用JIT,您有angular html -> embedded in js and parsed / executed on the fly
相关问题