Ubuntu 24.04

Angular 20 : インストール2025/08/04

 

Web アプリケーションフレームワーク Angular のインストールです。

[1]

こちらを参考に Node.js 22 をインストールしておきます

[2] Angular 20 をインストールします。
root@dlp:~#
npm install -g @angular/cli@20

.....
.....

added 338 packages in 8s

66 packages are looking for funding
  run `npm fund` for details
[3] 任意の一般ユーザーで動作確認します。
ubuntu@dlp:~$
ng version


     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 20.1.4
Node: 22.18.0
Package Manager: npm 10.9.3
OS: linux x64

Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.2001.4 (cli-only)
@angular-devkit/core         20.1.4 (cli-only)
@angular-devkit/schematics   20.1.4 (cli-only)
@schematics/angular          20.1.4 (cli-only)

ubuntu@dlp:~$
ng new hello-world


.....
.....

Packages installed successfully.

ubuntu@dlp:~$
cd hello-world

ubuntu@dlp:~/hello-world$
ng serve --host dlp.srv.world --port 4200


Warning: This is a simple server for use in testing or debugging Angular applications
locally. It hasn't been reviewed for security issues.

Binding this server to an open connection can result in compromising your application or
computer. Using a different host than the one passed to the "--host" flag might result in
websocket connection issues.

Browser bundles
Initial chunk files  | Names            |  Raw size
main.js              | main             |  47.85 kB |
styles.css           | styles           |  95 bytes |

                     | Initial total    |  47.95 kB


Server bundles
Initial chunk files  | Names            |  Raw size
main.server.mjs      | main.server      |  49.10 kB |
server.mjs           | server           |   1.79 kB |
polyfills.server.mjs | polyfills.server | 243 bytes |

Application bundle generation complete. [2.365 seconds]

Watch mode enabled. Watching for file changes...
NOTE: Raw file sizes do not reflect development server per-request transformations.
  →  Network: http://dlp.srv.world:4200/
  →  press h + enter to show help
[4] 任意のクライアントコンピューターで Web アクセスして、以下のようなページが表示されれば OK です。
関連コンテンツ