@seges/angular-navigation
Advanced tools
+1
-1
| { | ||
| "name": "@seges/angular-navigation", | ||
| "version": "3.0.2", | ||
| "version": "3.1.0", | ||
| "description": "Navigation menu for angular 1.5.8 using Telerik Kendo UI PanelBar", | ||
@@ -5,0 +5,0 @@ "main": "src/index.ts", |
+6
-0
@@ -21,2 +21,8 @@ # SEGES Navigation Menu Component for Angular 1.5.8 | ||
| ### Deeplinking | ||
| If you need to mark the corresponding url whehn deeplinking to a page, the start-url can be set to the hash of the window.location object. | ||
| If you want the menu to fold out the correct top level menu item, you need to handle this in your project configuration by setting the 'expanded' property of the navigation items. | ||
| ## Using the Navigation Toggle component | ||
@@ -23,0 +29,0 @@ |
@@ -30,2 +30,3 @@ import * as angular from "angular"; | ||
| config: INavigationConfig; | ||
| startUrl: string; | ||
| } | ||
@@ -49,2 +50,3 @@ | ||
| config: INavigationConfig; | ||
| startUrl: string; | ||
| closeButtonText: string; | ||
@@ -101,2 +103,9 @@ title: string; | ||
| ); | ||
| this.$rootScope.$watch( | ||
| () => { return this.startUrl; }, | ||
| (newValue: string, oldValue: string) => { | ||
| this.setSelectedMenuItem(newValue); | ||
| }, | ||
| ); | ||
| } | ||
@@ -124,2 +133,10 @@ | ||
| private setSelectedMenuItem(locationHash: string): void { | ||
| let startSelection: JQuery = $(`a[href='${locationHash}']`); | ||
| if (startSelection.length) { | ||
| startSelection.addClass("k-state-selected"); | ||
| } | ||
| } | ||
| /** | ||
@@ -247,4 +264,5 @@ * Interpolates strings to handle eventual angular syntax in the string. | ||
| config: "<", | ||
| startUrl: "<", | ||
| }, | ||
| template, | ||
| }); |
63019
1.43%332
4.73%34
21.43%