Puas yog angular 7 siv TypeScript?
Puas yog angular 7 siv TypeScript?

Video: Puas yog angular 7 siv TypeScript?

Video: Puas yog angular 7 siv TypeScript?
Video: Qhia saib seb yus tu hlub comment thiab nias like rau leej twg 2021 2024, Hlis ntuj nqeg
Anonim

Angular 7 siv TypeScript version 3.1. Txawm hais tias qhov no yog qhov kev hloov kho loj heev los ntawm Angular 6 uas siv TypeScript version 2.9, Kuv tseem tsis tau pom dab tsi uas yuav tsum tau hloov. Yog xav paub ntxiv koj tuaj yeem tshuaj xyuas cov TypeScript CHANGELOG.

Ib yam li ntawd ib tug yuav nug, yog TypeScript yuav tsum tau rau angular?

Koj sau tau Angular kev siv hauv ib qho TypeScript , ES6 lossis ES5 JavaScript. Txawm li cas los Angular nws tus kheej yog sau rau hauv TypeScript , feem ntau piv txwv ntawm lub vev xaib yog sau rau hauv TypeScript , feem ntau Angular hauj lwm xav tau koj sau TypeScript yog li phau ntawv no yuav qhia hauv TypeScript.

Ib sab saum toj, 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).

Ib yam li ntawd, nws tau nug, puas yog angular nruab TypeScript?

TypeScript yog hom lus tseem ceeb rau Angular kev txhim kho daim ntawv thov. Nws yog superset ntawm JavaScript nrog tsim-lub sij hawm txhawb rau hom kev nyab xeeb thiab cuab yeej. Browsers tsis tuaj yeem ua haujlwm TypeScript ncaj qha. Sau ntawv yuav tsum tau "transpiled" rau hauv JavaScript siv lub tsc compiler, uas yuav tsum tau ib co configuration.

Qhov txawv ntawm angular thiab TypeScript 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.

Pom zoo: