@huntsman-cancer-institute/navigation2
v17.27.0
Published
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17
Keywords
Readme
Navigation2
This library was generated with Angular CLI version 17
Switching from Navigation to Navigation 2
This project is meant to be an upgrade from the navigation 1 library. Unlike the navigation 1 library, it uses the an angular HTML instead of a JSON configuration. Since in the original navigation project all the components had to extend navcomponent, it lead to custom components for many of the HTML elements that we needed. In this library, many of the components have been removed since we do not and should not have a custom component for everything.
| Component | HTML Replacement |
| :----------------------------- | :--------------- |
| BadgeComponent | <div></div>, <hci-busy></hci-busy> |
| BrandNavComponent | <div></div>, <a></a>, <a><img></img></a> |
| DivNavComponent | <div></div> |
| LiDdNavComponent | <hci-dropdown-nav> <ul>...</ul> </hci-dropdown-nav> |
| LiExpNavComponent | <hci-dropdown-nav> <ul>...<li><button (click)="expand()"></button></li>....</ul> </hci-dropdown-nav> |
| LiNavComponent | <li><a></a></li>, <li><button></button></li>, <li><div></div></li> |
| NavComponent | N/A |
| TemplateComponent | <ngTemplate></ngTemplate> |
| UlNavComponent | <ul></ul> |
| AppHeaderComponent | <hci-header></hci-header> |
| AppFooterComponent | <hci-footer></hci-footer> |
| SidebarComponent | <hci-sidebar></hci-sidebar> |
| SearchListComponent | <hci-search-list></hci-search-list> |
| SearchListControllerComponent | Removed. Pass in functions for filter and sort on the new hci-search-list |
| SearchTreeComponent | Not implemented yet. |
| SearchTreeControllerComponent | Not implemented yet. Will likely be removed in favor of an approach similar to the search list component |
Code scaffolding
Run ng generate component component-name --project navigation2 to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project navigation.
Note: Don't forget to add
--project navigation2or else it will be added to the default project in yourangular.jsonfile.
Build
Run ng build navigation2 to build the project. The build artifacts will be stored in the dist/ directory.
Publishing
After building your library with ng build navigation2, go to the dist folder cd dist/navigation2 and run npm
publish.
Running unit tests
Run ng test navigation2 to execute the unit tests via Karma.
Further help
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.
