From 0f16a7a6527945503fd25f1168c60e75c47c57ca Mon Sep 17 00:00:00 2001 From: Chris Thielen Date: Sat, 8 Aug 2020 13:58:14 -0700 Subject: [PATCH] docs: rename sref symbols and export them for docs --- package.json | 10 +++++----- src/directives/stateDirectives.ts | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 289fd0408..8b3bdc623 100644 --- a/package.json +++ b/package.json @@ -129,11 +129,11 @@ "Interfaces": [ "Ng1StateDeclaration" ], - "Components": [ - "uiView", - "UISref", - "UISrefActive", - "uiStateDirective" + "Directives": [ + { "name": "uiView", "kindString": "Variable" }, + { "name": "uiSref", "kindString": "Variable" }, + { "name": "uiSrefActive", "kindString": "Variable" }, + { "name": "uiState", "kindString": "Variable" } ], "Other": [ "Transition", diff --git a/src/directives/stateDirectives.ts b/src/directives/stateDirectives.ts index 07540e813..48f9aa58a 100644 --- a/src/directives/stateDirectives.ts +++ b/src/directives/stateDirectives.ts @@ -281,8 +281,8 @@ function bindEvents(element: IAugmentedJQuery, scope: IScope, hookFn: EventListe * - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons). * If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive. */ -let uiSrefDirective: ng1_directive; -uiSrefDirective = [ +export let uiSref: ng1_directive; +uiSref = [ '$uiRouter', '$timeout', function $StateRefDirective($uiRouter: UIRouter, $timeout: ITimeoutService) { @@ -419,8 +419,8 @@ uiSrefDirective = [ * - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example. * ``` */ -let uiStateDirective: ng1_directive; -uiStateDirective = [ +export let uiState: ng1_directive; +uiState = [ '$uiRouter', '$timeout', function $StateRefDynamicDirective($uiRouter: UIRouter, $timeout: ITimeoutService) { @@ -569,8 +569,8 @@ uiStateDirective = [ * * - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'` */ -let uiSrefActiveDirective: ng1_directive; -uiSrefActiveDirective = [ +export let uiSrefActive: ng1_directive; +uiSrefActive = [ '$state', '$stateParams', '$interpolate', @@ -726,7 +726,7 @@ interface StateData { angular .module('ui.router.state') - .directive('uiSref', uiSrefDirective) - .directive('uiSrefActive', uiSrefActiveDirective) - .directive('uiSrefActiveEq', uiSrefActiveDirective) - .directive('uiState', uiStateDirective); + .directive('uiSref', uiSref) + .directive('uiSrefActive', uiSrefActive) + .directive('uiSrefActiveEq', uiSrefActive) + .directive('uiState', uiState);