典型的 ExpressJs 和 Angular2 文件结构是什么样的。 目前我有这个:
Project
|
|--bin
|--node_modules
|--public
|--images
|--javascripts
|--stylesheets
|--routes
|--views
|--app.js
|--package.json
在我的公共(public)文件夹中,我有 index.pug 和 layout.pug。这是 expressJs 提供的默认结构。现在我想添加 Angular2,我将把我的 Angular 文件放在哪里?我可以将 boostrap 与 jade 一起使用吗?让我补充一下,这是 Node 的新手。谢谢
最佳答案
您正在寻找的似乎是类似于标准 MEAN 堆栈应用程序的东西(尽管您的数据库可能不是 MongoDB)。你应该使用 Angular CLI在该项目目录中自动生成一个 Angular2 项目,如下所示:
Project
|-angular2-project-directory/
|--src/
|--package.json
|--README.md
|--...(Other Angular CLI generated files)
|--routes/
|--views/
|--app.js
|--package.json
希望这对您有所帮助!
关于node.js - 带有 Angular2 项目的 ExpressJs 的文件结构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38611469/