当我运行应用程序时,哪个文件首先在角度4应用程序中运行?

编程入门 行业动态 更新时间:2024-10-28 10:35:47
本文介绍了当我运行应用程序时,哪个文件首先在角度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应用程序中运行?

本文发布于:2023-11-12 03:23:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580365.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   当我   角度   文件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!