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.
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)
To start a local development server, run:
ng serve storeOnce 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.
To build the project run:
ng buildThis 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.
To execute unit tests with the Karma test runner, use the following command:
ng test