Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the entry point specified in angular application

I'm new in angular and got sample angular application installed using angular-cli. This has package.json file, which must usually have the entry point of that application. But I didnt find that being defined in this pre-defined pakage.json file. Where does the entry point of angular app gets specified in this and why not in package.json file as expected.

like image 554
kmg Avatar asked Dec 14 '22 12:12

kmg


2 Answers

Angular does not provide an entry point similar to node.js, but rather a compiled application (a bunch of .js files, .css files, assets and an index.html file). The application can be run by opening the index.html file.

What parts of the application will be compiled is being determined by your main.ts file, and mostly the line

platformBrowserDynamic().bootstrapModule(AppModule)

which defines the AppModule to be the "entry point" of your application.

It is the "root" module that you bootstrap to launch the application

Please see this documentation for further details.

like image 123
Julien Ambos Avatar answered Dec 28 '22 09:12

Julien Ambos


main.ts >> app.Module.ts >> app.component.ts >> index.html >> app.component.html

is the starting point in angular app You can refer here.

like image 39
AFSHAN Avatar answered Dec 28 '22 11:12

AFSHAN