- Electron Projects
- Denys Vuika
- 326字
- 2021-06-24 12:14:41
Generating our Angular project scaffold
In this section, we are going to learn how to set up a new project that follows Angular's development practices. Let's get started:
- Run the following commands to generate a new Angular project called integrate-angular:
ng new integrate-angular
cd integrate-angular
The Angular CLI tool usually asks a series of questions to clarify what extra features you want to have in the resulting application.
- If you're asked about routing support, type Y and press Enter:
Would you like to add Angular routing? (y/N)
Y
- Next, if the tool asks you about the stylesheet format, choose SCSS, as shown in the following code:
Which stylesheet format would you like to use? (Use arrow keys)
SCSS
- The output of the preceding code is as follows:

Note how the Angular CLI generates a set of files for you. The tool provides you with various ignore rules for NPM and Git inside the .gitignore file, configuration files for Typescript and the Karma test runner, and even a set of unit and end-to-end tests as part of the initial scaffold.
- Check out what the package.json file looks like, especially its general information and the scripts section:
{
"name": "integrate-angular",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
}
- The Angular CLI also performs dependency library installation, so all you need to do is run the following command to get your web application up and running:
npm start
Historically, every web app that we generate with the help of the Angular CLI runs on port 4200 by default. You can quickly change the port in the future, but for now let's stick to the defaults.
- Launch your preferred browser and navigate to http://locahost:4200. You should see a landing page called Welcome to integrate-angular! that the Angular CLI has created for you:

Now, let's configure the Electron shell so that it works with Angular code.
- Java高并發(fā)核心編程(卷2):多線程、鎖、JMM、JUC、高并發(fā)設(shè)計模式
- 編寫整潔的Python代碼(第2版)
- Rust Essentials(Second Edition)
- Java EE 7 Performance Tuning and Optimization
- C# Multithreaded and Parallel Programming
- Nagios Core Administration Cookbook(Second Edition)
- 區(qū)塊鏈架構(gòu)之美:從比特幣、以太坊、超級賬本看區(qū)塊鏈架構(gòu)設(shè)計
- Android Sensor Programming By Example
- 高性能PHP 7
- 基于MATLAB的控制系統(tǒng)仿真及應(yīng)用
- Expert Cube Development with SSAS Multidimensional Models
- R語言與網(wǎng)站分析
- 網(wǎng)絡(luò)工程方案設(shè)計與實施(第二版)
- Python游戲編程項目開發(fā)實戰(zhàn)
- GWT揭秘