当我运行应用程序时,哪个文件首先在角度4应用程序中运行? [英] which file runs first in an angular 4 app when i run the app?

查看:72
本文介绍了当我运行应用程序时,哪个文件首先在角度4应用程序中运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用角度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应用程序中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆