Dab tsi yog AOT thiab JIT hauv angular 2?
Dab tsi yog AOT thiab JIT hauv angular 2?

Video: Dab tsi yog AOT thiab JIT hauv angular 2?

Video: Dab tsi yog AOT thiab JIT hauv angular 2?
Video: Nahum 2~3, Habakkuk 1~3 | 1611 KJV | Day 261 2024, Tej zaum
Anonim

Tsuas yog hauv Sijhawm ( JIT ), compiles koj app nyob rau hauv lub browser ntawm runtime. Lub sijhawm ua ntej ( AOT ), sau koj lub app thaum tsim lub sijhawm ntawm lub server.

Hais txog qhov no, AOT sawv cev rau dab tsi?

Ua ntej-ntawm-lub sijhawm

Kuj Paub, uas compiler siv nyob rau hauv angular 2? Babel thiab typescript yog super txheej JavaScript lawv sau ua ke rau JavaScript siv typescriptabel compiler . Qhov zoo tshaj plaws los pib nrog Angular yog Quick Start siv Typescript. koj sau tau Angular hauv Vanilla JavaScript.

Khaws qhov no hauv kev txiav txim siab, dab tsi yog AOT muab tso ua ke vim li cas siv hauv angular 2?

Cov Angular Lub sijhawm ua ntej ( AOT ) compiler converts koj Angular HTML thiab TypeScript code rau hauv JavaScript code zoo thaum lub sijhawm tsim ua ntej browser rub tawm thiab sau cov lej ntawd. Sau ntawv koj daim ntawv thov Thaum lub sij hawm tsim cov txheej txheem muab ib tug ceev rendering nyob rau hauv lub browser.

Ngfactory yog dab tsi?

ng- fab. Lub tsev qiv ntawv txhim kho kev txhim kho kev ua haujlwm tau tsim nyob rau sab saum toj ntawm Gulp thiab tsom mus rau AngularJS cov khoom thiab cov ntawv thov. ng-Factory yog raws li cov kev coj ua zoo tshaj plaws thiab npog tag nrho cov kev loj hlob lifecycle: Kev tsim kho: code zoo, preprocessors Tsim: minification, concat, txhaj

Pom zoo: