This widget is used to show a global menu in all the forthcoming SDP Modules.
In the global config/config.js file, setup the correct API url like:
... API_URL_MENU: process.env.API_URL_MENU || 'https://sdpmenu-api-aaaa.bbbb.be/...', ...
- Install this smartwidget:
npm install sdp-menu
- Now you include the menu as follows:
<sdp-menu [isLoggedIn]="!!(ss.loggedInUser$ | async)"
[unsavedChanges]="ss.unsavedChanges$ | async"
[customerSelected]="customerSelected$ | async"
[privileges]="privileges"
(onMenu)="onMenu($event: MenuNode)"
(onSelect)="onSelect({ event: MouseEvent, item: MenuNode })"></sdp-menu>
This library was generated with Angular CLI version 8.2.14.
Run ng generate component component-name --project sdp-menu
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project sdp-menu
.
Note: Don't forget to add
--project sdp-menu
or else it will be added to the default project in yourangular.json
file.
Run ng build sdp-menu
to build the project. The build artifacts will be stored in the dist/
directory.
After building your library with ng build sdp-menu
, go to the dist folder cd dist/sdp-menu
and run npm publish
.
Run ng test sdp-menu
to execute the unit tests via Karma.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.