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

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

问题描述

我使用的是 angular 4,我有一个问题.当我运行项目并使用 ng serve 时,我的项目中的哪个文件首先呈现?有很多像 main.tsangular-cli.jsonapp.module 这样的文件,我不明白什么时候发生我运行 ng serve.

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.

这篇关于当我运行应用程序时,哪个文件首先在 angular 4 应用程序中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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