How to configure Angular development environment in windows environment
Node.js
Installation
Node.js
is more convenient to install, go directly to Node.js Official download, and then follow the steps to install it
You can install it in any directory, such as
D:\nodejs\
Node.js
comes with itnpm
, so there is no need to install it
Open the cmd
terminal and use the following command to check whether the Node.js
installation is successful:
node -v npm -v
If a version number appears, indicate Node.js
Installation successful
Configuration
Configure prefix and cache
Use the following command to view the configuration of npm
npm config ls
You can see that npm initially placed the downloaded dependency packages and cache in the C drive. Obviously this is not appropriate, but you can configure these two directories
npm config set prefix "D:\nodejs\node_global" npm config set cache "D:\nodejs\node_cache"
Configure environment variables
Right-click "Computer"->"Properties"->"Advanced System Settings"->"Environment Variables"
In System Variables
, setNODE_PATH
, the value is
D:\nodejs\node_global\node_modules\
In user variables
, modify path
and add
D:\nodejs\node_global\
Change npm’s mirror source
Since the initial source of npm
is from abroad, the speed may be a bit slow
You can configure Taobao’s mirror cnpm
here, and ## will be used later Change the command of #npm to
cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.orgIf you choose Taobao’s
cnmp mirror, you should set it up to ensure normal downloading of the tool
ng set --global packageManager = cnpmTypescript
Execute the following command
npm install -g typescript typingsCheck the version number
tsc -vAngular-cli
##angular -cli
It is an official build tool of the Angular framework. The core is webpack
, and npm
as a dependent package. Execute the following command
npm install -g @angular-cli
Check version number
ng -v
Create project
You can create a workspace under nodejsmd D:\nodejs\workspace
Then enter the workspace
cd D:\nodejs\workspace
Create a new project
ng new hello-world
and then start the service in the
hello-world folder <pre class='brush:php;toolbar:false;'>ng serve</pre>
The Angular service listens to the
port by default, open the browser, Enter <pre class='brush:php;toolbar:false;'>localhost:4200</pre>
or enter the following command to directly open the default browser
ng serve --open
If a successful page appears, it means that all configurations are successful
The above is the detailed content of How to configure Angular development environment in windows environment. For more information, please follow other related articles on the PHP Chinese website!

JavaScript originated in 1995 and was created by Brandon Ike, and realized the language into C. 1.C language provides high performance and system-level programming capabilities for JavaScript. 2. JavaScript's memory management and performance optimization rely on C language. 3. The cross-platform feature of C language helps JavaScript run efficiently on different operating systems.

JavaScript runs in browsers and Node.js environments and relies on the JavaScript engine to parse and execute code. 1) Generate abstract syntax tree (AST) in the parsing stage; 2) convert AST into bytecode or machine code in the compilation stage; 3) execute the compiled code in the execution stage.

The future trends of Python and JavaScript include: 1. Python will consolidate its position in the fields of scientific computing and AI, 2. JavaScript will promote the development of web technology, 3. Cross-platform development will become a hot topic, and 4. Performance optimization will be the focus. Both will continue to expand application scenarios in their respective fields and make more breakthroughs in performance.

Both Python and JavaScript's choices in development environments are important. 1) Python's development environment includes PyCharm, JupyterNotebook and Anaconda, which are suitable for data science and rapid prototyping. 2) The development environment of JavaScript includes Node.js, VSCode and Webpack, which are suitable for front-end and back-end development. Choosing the right tools according to project needs can improve development efficiency and project success rate.

Yes, the engine core of JavaScript is written in C. 1) The C language provides efficient performance and underlying control, which is suitable for the development of JavaScript engine. 2) Taking the V8 engine as an example, its core is written in C, combining the efficiency and object-oriented characteristics of C. 3) The working principle of the JavaScript engine includes parsing, compiling and execution, and the C language plays a key role in these processes.

JavaScript is at the heart of modern websites because it enhances the interactivity and dynamicity of web pages. 1) It allows to change content without refreshing the page, 2) manipulate web pages through DOMAPI, 3) support complex interactive effects such as animation and drag-and-drop, 4) optimize performance and best practices to improve user experience.

C and JavaScript achieve interoperability through WebAssembly. 1) C code is compiled into WebAssembly module and introduced into JavaScript environment to enhance computing power. 2) In game development, C handles physics engines and graphics rendering, and JavaScript is responsible for game logic and user interface.

JavaScript is widely used in websites, mobile applications, desktop applications and server-side programming. 1) In website development, JavaScript operates DOM together with HTML and CSS to achieve dynamic effects and supports frameworks such as jQuery and React. 2) Through ReactNative and Ionic, JavaScript is used to develop cross-platform mobile applications. 3) The Electron framework enables JavaScript to build desktop applications. 4) Node.js allows JavaScript to run on the server side and supports high concurrent requests.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Zend Studio 13.0.1
Powerful PHP integrated development environment
