Kuv puas yuav tsum tau nruab TypeScript rau angular 2?
Kuv puas yuav tsum tau nruab TypeScript rau angular 2?

Video: Kuv puas yuav tsum tau nruab TypeScript rau angular 2?

Video: Kuv puas yuav tsum tau nruab TypeScript rau angular 2?
Video: puas yog koj ntshai yuav kuv ntsaim vaj 2022 -2023 2024, Hlis ntuj nqeg
Anonim

TypeScript tsis tas yuav sau Angular 2 , mas kuv muaj xaiv qhov kev xaiv no vim hom kab ke nws muaj thiab yog tias koj tuaj ntawm C # nws yooj yim heev rau siv rau nws, koj ua tau zoo heev sau koj Angular 2 app siv ib txwm ECMAScript 5 (tus qauv JavaScript uas feem ntau ntawm cov apps tau sau), tab sis kuv

Ib yam li ntawd, koj tuaj yeem nug, yog TypeScript 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.

Ib yam li ntawd, kuv yuav tsum siv TypeScript? TypeScript simplifies JavaScript code, ua kom yooj yim nyeem thiab debug. TypeScript muab cov cuab yeej tsim kho tau zoo rau JavaScript IDEs thiab cov kev coj ua, xws li kev kuaj xyuas zoo li qub. TypeScript ua code yooj yim nyeem thiab nkag siab.

Tsis tas li lo lus nug yog, yog node JS yuav tsum tau rau angular 2?

Yog lawm. Node . js xav tau rau Angular 2 los yog Angular apps. Peb yuav tsum tau nruab Node.

Koj tuaj yeem qhia tau li cas yog tias TypeScript raug teeb tsa?

Kuaj qhov ntawd tus TypeScript raug ntsia kom raug los ntawm kev ntaus ntawv tsc -v rau hauv koj lub davhlau ya nyob twg lossis hais kom ua. Koj yuav tsum saib TypeScript version luam tawm mus rau qhov screen. Rau pab rau kev sib cav uas koj tuaj yeem ntaus tsc -h lossis tsc.

Pom zoo: