@alteus/ui-commons v0.0.1
Table of contents
Quick start
- Install with npm:
npm i @alteus/alteus-ui-commons
What's included
Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:
alteus-ui-commons/
└── lib/
└── context-menu
├── context-menu.directive.ts
├── context-menu.module.ts
└── loading-spinner
├── loading-spinner.component.ts
├── loading-spinner.module.ts
Documentation
AlteusUiCommons's library include 2 modules, ContextMenuModule
and LoadingSpinnerModule
.
I. ContextMenuModule
This module offers a directive ContextMenuDirective
with acContextMenu
selector. In the following example we see that this directive receives a menu template (menuTemplate
).
This template will be displayed as a context menu.
<div acContextMenu [menuTemplate]="menu">
<ng-template #menu>
<div class="list-group column-list">
<button type="button" *ngFor="let user of users">
{{ column.colDef.headerName }}
</button>
</div>
</ng-template>
</div>
II. LoadingSpinnerModule This module will be available in future versions.
Running locally
- Run
npm i @alteus/alteus-ui-commons --save
to install the AlteusUiCommons - Include
ContextMenuModule
orLoadingSpinnerModule
in your*.module.ts
- Run
ng serve
- Open
http://localhost:4200/
in your browser, and voilà.
Build
Run ng build alteus-ui-commons --prod
to build the project. The build artifacts will be stored in the dist/
directory.
Publishing
After building your library with ng build alteus-ui-commons
, go to the dist folder cd dist/alteus-ui-commons
and run npm publish
.
5 years ago