Bootstrapping txhais li cas hauv angular?
Bootstrapping txhais li cas hauv angular?

Video: Bootstrapping txhais li cas hauv angular?

Video: Bootstrapping txhais li cas hauv angular?
Video: yuav los qhia txog peb pw ua npau suav tsis zoo thiab zoo txawv li cas 2024, Tej zaum
Anonim

Bootstrapping yog ib tug txheej txheem ntawm initializing los yog loading peb Angular daim ntawv thov. cia peb taug kev los ntawm peb cov cai tsim hauv Tsim Koj Thawj Tshiab Angular peb tes num thiab pom dab tsi tshwm sim nyob rau hauv txhua theem thiab yuav ua li cas peb AppComponent tau loaded thiab qhia "app ua haujlwm!".

Tom qab ntawd, ib tug kuj yuav nug, dab tsi yog txhais los ntawm bootstrapping?

Bootstrap , los yog bootstrapping , yog ib qho lus qhia los ntawm cov lus hais tias, "kom rub nws tus kheej los ntawm nws txoj hlua khi." Lub ntsiab lus txhais tau hais tias tus neeg yog tus kheej txaus, tsis xav tau kev pab los ntawm lwm tus. Daim ntawv tseem ceeb tshaj plaws ntawm bootstrapping yog tus txheej txheem pib uas tshwm sim thaum koj pib lub computer.

AppComponent hauv angular yog dab tsi? Ib qho bootstrapped tivthaiv yog ib qho khoom nkag uas Angular loads rau hauv DOM thaum lub sij hawm bootstrap txheej txheem (daim ntawv thov tso tawm). Lwm cov khoom nkag tau thauj khoom dynamically los ntawm lwm txoj kev, xws li nrog lub router. Angular loads ib cag AppComponent dynamically vim nws tau teev los ntawm hom hauv @NgModule. bootstrap.

Yog li ntawd, yog vim li cas bootstrap siv nyob rau hauv angular?

Bootstrap yog qhov nrov tshaj plaws HTML, CSS, thiab JavaScript lub moj khaum rau kev txhim kho web pem hauv ntej kawg. Nws yog qhov zoo rau kev tsim cov teb, mobile-thawj lub vev xaib. Tsis tas li ntawd peb mam li saib ntawm Ng- Bootstrap qhov project uas muab Angular Bootstrap cov khoom uas tuaj yeem ua tau siv tawm ntawm lub thawv.

Vim li cas bootstrapping siv?

Bootstrapping tso cai rau kev ntsuas qhov tseeb (txhais tau hais txog kev tsis ncaj ncees, kev sib txawv, kev ntseeg siab, kev kwv yees yuam kev lossis lwm yam kev ntsuas) rau cov qauv kwv yees. Cov txheej txheem no tso cai rau kev kwv yees ntawm qhov piv txwv ntawm yuav luag txhua qhov kev txheeb cais uas siv cov qauv random sampling.

Pom zoo: