简体   繁体   中英

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 . 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? 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

  • With AOT compiler you have angular html -> TS (to ensure types are correct) - > JS
  • With JIT you have angular html -> embedded in js and parsed / executed on the fly

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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