简体   繁体   English

Typescript是否转换Angular Compiler生成的转换代码

[英]Does typescript transpile the Transformed code generated by Angular Compiler

I was watching The Angular Compiler 4.0 - TOBIAS BOSCH and suddenly at 1:30 of the video it was said that AST is transformed into typescript code if we use AOT compilation or javascript code if we use JIT compilation . 我当时正在观看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 compilation ,则AST is transformed into typescript code if we use AOT compilation or javascript code if we use JIT compilationAST is transformed into typescript code if we use AOT compilation or javascript code if we use JIT compilation Compilation process a snapshot of the video . 编译处理视频的快照 now I am super confused what actually is happening under the hood? 现在,我非常困惑,实际情况是什么? Whether (.ts) is transpiled to js first by typescript compiler and then angular compiler comes into the play or angular compiler do the job and typescript compiler comes into the play? 是先将(.ts)由Typescript编译器转换为js,然后再将angular编译器投入使用,还是由angular编译器完成工作,然后将typescript编译器投入使用? I went through this What does the angular compiler “compile”? 我经历了这个过程,角度编译器会“编译”什么? but apparently my doubt is not clear yet? 但显然我的疑问还不清楚吗? Can anyone help me out on this? 有人可以帮我吗?

Whether (.ts) is transpiled to js first by typescript compiler and then angular compiler comes into the play or angular compiler do the job and typescript compiler comes into the play 是先将(.ts)由Typescript编译器转换为js,然后再由angular编译器发挥作用,还是由angular编译器完成工作,然后由Typescript编译器发挥作用

  • With AOT compiler you have angular html -> TS (to ensure types are correct) - > JS 使用AOT编译器,您可以使用html- angular html -> TS (to ensure types are correct) - > JS
  • With JIT you have angular html -> embedded in js and parsed / executed on the fly 使用JIT,您可以将angular html -> embedded in js and parsed / executed on the fly

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM