CentOS Stream 10
Sponsored Link

Angular 18 : インストール2025/02/10

 

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

[1]

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

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


added 266 packages in 12s

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


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


Angular CLI: 18.2.14
Node: 22.11.0
Package Manager: npm 10.9.0
OS: linux x64

Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1802.14 (cli-only)
@angular-devkit/core         18.2.14 (cli-only)
@angular-devkit/schematics   18.2.14 (cli-only)
@schematics/angular          18.2.14 (cli-only)

[cent@dlp ~]$
ng new hello-world


.....
.....

CREATE hello-world/src/app/app.config.server.ts (350 bytes)
CREATE hello-world/public/favicon.ico (15086 bytes)
✓ Packages installed successfully.

[cent@dlp ~]$
cd hello-world

[cent@dlp hello-world]$
ng serve --host dlp.srv.world --port 4200

Would you like to share pseudonymous usage data about this project with the Angular Team
at Google under Google's Privacy Policy at https://policies.google.com/privacy. For more
details and how to change this setting, see https://angular.dev/cli/analytics.

   yes

Thank you for sharing pseudonymous usage data. Should you change your mind, the following
command will disable this feature entirely:

    ng analytics disable

Global setting: enabled
Local setting: enabled
Effective status: enabled

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. You might need to use "--disable-host-check" if that's the
case.

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

                        | Initial total       | 113.08 kB


Server bundles
Initial chunk files     | Names               |  Raw size
polyfills.server.mjs    | polyfills.server    | 572.91 kB |
main.server.mjs         | main.server         |  23.23 kB |
render-utils.server.mjs | render-utils.server | 472 bytes |

Application bundle generation complete. [2.461 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 です。
関連コンテンツ