我正在使用角度4,我有一个问题。当我运行项目并使用ng serve时,我的项目中的哪个文件首先呈现?有这么多的文件,如 main.ts , angular-cli.json , app。模块我不明白当我运行服务时会发生什么。
I'm using angular 4 and I have a question. when I run the project and use ng serve, which file in my project renders first? there are so many files like main.ts, angular-cli.json, app.module and I don't understand whats going on when I run ng serve.
推荐答案angular。 json - > angular-cli配置文件 main.ts - > Angular模块引导应用程序文件。为您的应用程序设置输入模块。 app.module.ts - >根据您的输入模块,它配置哪个组件将首先从该模块加载,以及其他依赖模块,组件,管道和服务。
angular.json -> angular-cli configuration file main.ts -> Angular module bootstrap application file. Set the entry module for your application. app.module.ts -> Based upon your entry module, it configures which component will load first from that module and what others dependency modules, components, pipes, services.
更多推荐
当我运行应用程序时,哪个文件首先在角度4应用程序中运行?
发布评论