简体   繁体   English

Angular 项目创建

[英]Angular Project creation

I have a node project which is running fine.我有一个运行良好的节点项目。 I need to create a angular project inside that node project我需要在该节点项目中创建一个角度项目

So that i can run backend and front end这样我就可以运行后端和前端

Could you please suggest the way of creating an angular project inside a node projet您能否建议在节点项目中创建角度项目的方法

You need to create separate project for front end.您需要为前端创建单独的项目。 Join both back end and front end with API.使用 API 连接后端和前端。 For creation of new angular project read this doc https://cli.angular.io/要创建新的 angular 项目,请阅读此文档https://cli.angular.io/

For creating an angular project inside node project folder.用于在节点项目文件夹中创建角度项目。

Open path of your node project(where you want to add angular project) in terminal and run angular cli command: ng new 'project_name' for creating a new angular project.在终端中打开节点项目的路径(要添加 angular 项目的位置)并运行 angular cli 命令: ng new 'project_name'以创建新的 angular 项目。

You can run both frontend and backend server simultaneously by running respective commands of starting servers: ng serve for frontend and node 'index/app.js' for backend.您可以通过运行各自的启动服务器命令来同时运行前端和后端服务器: ng serve用于前端, node 'index/app.js'用于后端。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM