Skip to content

Latest commit

 

History

History

README.md

ng-xtend logo Advanced Type Example

Show how ng-xtend framework supports complex types, like many-to-one, one-to-many or many-to-many relations. You can see that when editing the author of a book, you can select it from a list of all authors.

What's included

Same as the store example, with the addition of:

  • The authors are now linked to books with a many to one relation (see src/app/app.ts)
  • We create two signal Store, one to manage the authors and one to manage the books (see src/advanced-type-display/advanced-type-display.ts)
  • To ease the development, we create the typescript types for book and authors ( see src/model/types.ts)
  • You can edit both the author list and select one for each book (see src/advanced-type-display/advanced-type-display.html)

Development server

To start a local development server, run:

ng serve store

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.

Building

To build the project run:

ng build

This will compile your project and store the build artifacts in the dist/ directory. By default, the production build optimizes your application for performance and speed.

Running unit tests

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

ng test