# Demo Angular Springboot **Repository Path**: glm1499360414/demo-angular-springboot ## Basic Information - **Project Name**: Demo Angular Springboot - **Description**: Simple front-end and back-end separation project using angular and springboot - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-05-13 - **Last Updated**: 2024-05-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 介绍 此项目使用angular和springboot进行前后端分离开发,作为课程“使用Angular及Spring Boot快速构建复杂应用”的demo # 创建项目 ## 创建angular项目 ### 预先准备 #### 安装nodejs(demo为16.20.2) ##### windows https://nodejs.org/en/download tips: .msi是Windows installer开发出来的程序安装文件,它可以让你安装,修改,卸载你所安装的程序。说白了.msi就是Windows installer的数据包,把所有和安装文件相关的内容封装在一个包里。此外:它还包含有关安装过程自己的信息。例如:安装序列、目标文件夹路径、安装选项和控制安装过程的属性。 .zip是一个压缩包,解压之后即可,不需要安装 ##### Linux(ubuntu 20.04) ###### 推荐使用nvm安装nodejs https://github.com/nvm-sh/nvm ```shell curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash # or wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash # than source ~/.bashrc nvm install 16.20.2 node -v ``` ###### 使用apt安装(此时无法指定版本,除非自己下载二进制文件或者直接从node source中进行下载) ```shell sudo apt update sudo apt install nodejs npm ``` ###### 从nodeSource中进行安装 ```shell curl -sL https://deb.nodesource.com/setup_16.20.2 | sudo -E bash - sudo apt install nodejs ``` #### 安装angularcli(demo为16.2) tips: 如果你并不是永远使用一个angular版本,请不要使用`-g`参数进行全局安装 ```shell npm install @angular/cli@16.2 --save-dev ``` 这会创建一个node_models文件夹,里面包含了angularcli的所有依赖 ### 创建angular项目(demo为16.2) ```shell npx ng new <项目名称> ``` ## 创建springboot项目(demo为3.1.0) 直接使用IDEA进行创建即可,或者可以前往[Spring Initializr](https://start.spring.io/)进行创建