Jason Swett
Jason Swett

Reputation: 45084

What does it mean to "bootstrap" an Angular application?

There are a number of places in the Angular docs where the word "bootstrap" appears as a link. The link takes you here.

I don't see anything in the linked section that actually says what the word "bootstrap" means. As far as I can tell it's just a synonym for "start", but I don't know if I'm right about that.

I know that you can do something like platformBrowserDynamic().bootstrapModule(AppModule); and it will "bootstrap" your app using the AppModule. That doesn't really tell me the meaning of the word, though.

So what does bootstrap mean, exactly?

Upvotes: 14

Views: 6633

Answers (3)

Prathik
Prathik

Reputation: 474

As per my knowledge bootstrapping an app would bascially mean from where it should begin the execution or which is the file to be executed first. In this case bootstrapModule(AppModule); means that AppModule is the Module which has all the information about the app and the execution must begin there.

Upvotes: 1

Tom Hoffman
Tom Hoffman

Reputation: 131

I, too, had this question because I had forgotten what it means. I was getting especially confused with the Bootstrap CSS framework. Your original question asked the meaning from a more general meaning, and not just with respect to Angular.

Bootstrapping is actually an old computer term and I think Wikipedia's definition is decent:

In general, bootstrapping usually refers to a self-starting process that is supposed to proceed without external input. In computer technology the term (usually shortened to booting) usually refers to the process of loading the basic software into the memory of a computer after power-on or general reset, especially the operating system which will then take care of loading other software as needed.

The term appears to have originated in the early 19th-century United States (particularly in the phrase "pull oneself over a fence by one's bootstraps") to mean an absurdly impossible action, an adynaton.

Upvotes: 3

yurzui
yurzui

Reputation: 214017

The bootstrapping process sets up the execution environment, digs the root AppComponent out of the module's bootstrap array, creates an instance of the component and inserts it within the element tag identified by the component's selector.

enter image description here

Upvotes: 8

Related Questions