Set up Angular CLI and simple angular application

Source: https://angular.io/guide/quickstart

Install Node.js® and npm if they are not already on your machine.
Verify that you are running at least node 6.9.x and npm 3.x.x by running node -v
and npm -v in a terminal/console window.
Older versions produce errors, but newer versions are fine.
Then install the Angular CLI globally.
npm install -g @angular/cli






 Create a new project

Open a terminal window.
Generate a new project and skeleton application by running the following commands:
ng new my-app
Patience, please. It takes time to set up a new project; most of it is spent installing npm packages.

Serve the application

Go to the project directory and launch the server.
cd my-app
ng serve --open

The ng serve command launches the server, watches your files, and rebuilds the app as you make changes to those files.
Using the --open (or just -o) option will automatically open your browser on http://localhost:4200/.
Your app greets you with a message:



The app works!

Không có nhận xét nào:

Is it okay to use both fetchpriority="high" and loading="eager" in img tag?

 https://stackoverflow.com/questions/77744344/is-it-okay-to-use-both-fetchpriority-high-and-loading-eager-in-img-tag Yes Fetchpriority and l...