Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

khollenbeck-angular-navigation

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

khollenbeck-angular-navigation - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

23

kh-navigation.component.ts

@@ -26,2 +26,25 @@ import { Component, Input, HostBinding } from '@angular/core';

}
public onItemClicked(event: any) {
const currentTarget = event.currentTarget;
const subMenu = currentTarget.children[1];
const expand = currentTarget.children[0].children[1];
const collapse = currentTarget.children[0].children[2];
if (currentTarget.dataset.redirect) {
window.location.href = currentTarget.dataset.redirect;
}
if (expand && collapse) {
if (expand.classList.contains('hide')) {
expand.classList.remove('hide');
collapse.classList.add('hide');
subMenu.classList.add('closed');
} else if (collapse.classList.contains('hide')) {
expand.classList.add('hide');
collapse.classList.remove('hide');
subMenu.classList.remove('closed');
}
}
}
}

2

package.json
{
"name": "khollenbeck-angular-navigation",
"version": "0.0.2",
"version": "0.0.3",
"description": "'Angular/Typescript navigation component'",

@@ -5,0 +5,0 @@ "author": "Kris Hollenbeck",

### Angular Navigation Component
To be used only with an Angular CLI project.
This component will not work properly with other Angular projects.
This component will not work properly with other Angular projects.
#### Install
`npm install khollenbeck-angular-navigation`
#### Public Functions
```
// Items to display in navigation menu
items() Array<string>
// Toggle to hide/show navigation menu
toggle()
```

@@ -5,2 +5,3 @@ interface KHNavigationItem {

href?: string;
menu?: Array<KHNavigationItem>;
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc