Kuv tuaj yeem siv angular yam tsis muaj TypeScript?
Kuv tuaj yeem siv angular yam tsis muaj TypeScript?

Video: Kuv tuaj yeem siv angular yam tsis muaj TypeScript?

Video: Kuv tuaj yeem siv angular yam tsis muaj TypeScript?
Video: Yeej Tsis Paub | Kong Chue (Official Music Video) 2024, Kaum ib hlis
Anonim

Cov lus teb tsuas yog NO. Vim Angular app genrate los ntawm kev pab ntawm Angular CLI. Code uas yog sau rau buid ib lub kaum sab xis app yog sau rau hauv Sau ntawv nkaus xwb. Thaum lub sij hawm compile CLI hloov lub Sau ntawv code rau hauv pob ntawm JAVASCRIPT code.

Tsuas yog li ntawd, TypeScript puas tsim nyog rau angular?

Koj tsis ua xav tau kawm ua ntej Angular 2. Koj tsis txawm xav tau kawm TypeScript tag nrho. Tab sis qhov ntawd tsis tau txhais hais tias koj yuav tsum tsis txhob kawm TypeScript . Kev zoo nkauj ntawm TypeScript lus dag nyob rau hauv qhov tseeb uas yog ib tug superset ntawm JavaScript thiab yog li, tag nrho cov JavaScript kuj siv tau TypeScript.

Tsis tas li ntawd, qhov txawv ntawm TypeScript thiab angular yog dab tsi? Angular , kuj hu AngularJS , yog JavaScript lub moj khaum rau kev tsim cov vev xaib nplua nuj. Txawm li cas los xij, nws tsim nyog sau cia tias Angular 2 siab txhawb kev siv TypeScript es tsis txhob txwv cov neeg siv kom yooj yim JavaScript. TypeScript . TypeScript yog ib hom lus programming uas yog superset ntawm JavaScript.

Tom qab ntawd, peb puas tuaj yeem khiav angular yam tsis muaj node?

CEEB TOOM: Yog koj tsuas yog siv JS dawb hauv kev txhim kho koj ua tsis xav tau Node . Koj khiav tau ib Angular app ntawm txhua lub server uas ua tau host cov ntaub ntawv zoo li qub. Tsis muaj dab tsi tshwj xeeb txog node . Yog vim li cas rau qhov no yog tias JavaScript yog khiav ntawm tus neeg siv khoom.

Vim li cas angular hauv TypeScript?

Angular yog tsim siv TypeScript uas coj ntau yam txiaj ntsig rau lub rooj xws li: TypeScript yog tus superset ntawm JavaScript. TypeScript tsis yog nws tus kheej ib leeg lus zoo li CoffeeScript, Dart lossis lwm tus thiab qhov ntawd yog qhov muaj zog heev. TypeScript muab kev txhawb nqa rau hom (primitives, interfaces, thiab lwm yam kev cai hom).

Pom zoo: