Skip to content

Latest commit

 

History

History
97 lines (60 loc) · 2.67 KB

File metadata and controls

97 lines (60 loc) · 2.67 KB

Angular + Cornerstone3D

This project uses Angular CLI with Cornerstone3D for DICOM viewing. It can run at the site root or under a subpath (e.g. /subpath/).

Build and run

Main path (app at /)

  • Dev: npm start or npm run dev → open http://localhost:4200/
  • Build: npm run build → output in dist/angular-vite-6/
  • Preview: npm run preview → builds then serves at http://localhost:4201/ (use this if dev server doesn’t load images)

Subpath (app at /subpath/)

For production, deploy the build from build:subpath to a server that serves the app under /subpath/.

Development server

To start a local development server (main path), run:

ng serve

Once the server is running, open your browser and navigate to http://localhost:4200/. The application will automatically reload whenever you modify any of the source files.

Code scaffolding

Angular CLI includes powerful code scaffolding tools. To generate a new component, run:

ng generate component component-name

For a complete list of available schematics (such as components, directives, or pipes), run:

ng generate --help

Building

To build the project (main path):

ng build

To build for deployment under a subpath:

npm run build:subpath

Build artifacts are in dist/angular-vite-6/. The production build optimizes your application for performance and speed.

Preview (production build locally)

To build and serve the production output locally (useful when the dev server doesn’t load images or to test the real bundle):

npm run preview

Then open http://localhost:4201/. For a subpath build:

npm run preview:subpath

Then open http://localhost:4202/. The first run may prompt to install the serve package if needed.

Running unit tests

To execute unit tests with the Karma test runner, use the following command:

ng test

Running end-to-end tests

For end-to-end (e2e) testing, run:

ng e2e

Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.

Additional Resources

For more information on using the Angular CLI, including detailed command references, visit the Angular CLI Overview and Command Reference page.