Skip to content

Commit 10734f1

Browse files
docs(directives): changed names of ng1 directive variables
1 parent 1dcba89 commit 10734f1

File tree

3 files changed

+26
-22
lines changed

3 files changed

+26
-22
lines changed

src/common/glob.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
/** @module state */ /** for typedoc */
1+
/** @module common */
2+
/**
3+
* Matches state names using glob-like patterns.
4+
*
5+
* See: [[StateService.includes]]
6+
*/
27
export class Glob {
38
text: string;
49
glob: Array<string>;

src/ng1/directives/stateDirectives.ts

+18-19
Original file line numberDiff line numberDiff line change
@@ -70,25 +70,24 @@ function defaultOpts(el, $state) {
7070
/**
7171
* `ui-sref`: A directive for linking to a state
7272
*
73-
* A directive that binds a link (`<a>` tag) to a state. If the state has an associated
74-
* URL, the directive will automatically generate & update the `href` attribute via
75-
* the {@link ui.router.state.$state#methods_href $state.href()} method. Clicking
76-
* the link will trigger a state transition with optional parameters.
73+
* A directive that binds a link (`<a>` tag) to a state.
74+
* If the state has an associated URL, the directive will automatically generate and
75+
* update the `href` attribute via the [[StateService.href]] method.
76+
* Clicking the link will trigger a state transition with optional parameters.
7777
*
7878
* Also middle-clicking, right-clicking, and ctrl-clicking on the link will be
7979
* handled natively by the browser.
8080
*
8181
* You can also use relative state paths within ui-sref, just like the relative
82-
* paths passed to `$state.go()`. You just need to be aware that the path is relative
83-
* to the state that the link lives in, in other words the state that loaded the
84-
* template containing the link.
82+
* paths passed to `$state.go()`.
83+
* You just need to be aware that the path is relative to the state that the link lives in.
84+
* In other words, the state that created the view containing the link.
8585
*
86-
* You can specify options to pass to {@link ui.router.state.$state#go $state.go()}
87-
* using the `ui-sref-opts` attribute. Options are restricted to `location`, `inherit`,
88-
* and `reload`.
86+
* You can specify options to pass to [[StateService.go]] using the `ui-sref-opts` attribute.
87+
* Options are restricted to `location`, `inherit`, and `reload`.
8988
*
90-
* Here's an example of how you'd use ui-sref and how it would compile. If you have the
91-
* following template:
89+
* Here's an example of how you'd use ui-sref and how it would compile.
90+
* If you have the following template:
9291
*
9392
* @example
9493
* ```html
@@ -130,7 +129,7 @@ function defaultOpts(el, $state) {
130129
* @param {string} ui-sref 'stateName' can be any valid absolute or relative state
131130
* @param {Object} ui-sref-opts options to pass to [[StateService.go]]
132131
*/
133-
let uiSrefNg1 = ['$state', '$timeout',
132+
let uiSref = ['$state', '$timeout',
134133
function $StateRefDirective($state, $timeout) {
135134
return {
136135
restrict: 'A',
@@ -182,7 +181,7 @@ function $StateRefDirective($state, $timeout) {
182181
* @param {Object} ui-state-params params to pass to [[StateService.href]]
183182
* @param {Object} ui-state-opts options to pass to [[StateService.go]]
184183
*/
185-
let uiStateNg1 = ['$state', '$timeout',
184+
let uiState = ['$state', '$timeout',
186185
function $StateRefDynamicDirective($state, $timeout) {
187186
return {
188187
restrict: 'A',
@@ -294,7 +293,7 @@ function $StateRefDynamicDirective($state, $timeout) {
294293
* to both the <div> and <a> elements. It is important to note that the state
295294
* names/globs passed to ui-sref-active shadow the state provided by ui-sref.
296295
*/
297-
let uiSrefActiveNg1 = ['$state', '$stateParams', '$interpolate', '$transitions',
296+
let uiSrefActive = ['$state', '$stateParams', '$interpolate', '$transitions',
298297
function $StateRefActiveDirective($state, $stateParams, $interpolate, $transitions) {
299298
return {
300299
restrict: "A",
@@ -403,7 +402,7 @@ function $StateRefActiveDirective($state, $stateParams, $interpolate, $transitio
403402
}];
404403

405404
angular.module('ui.router.state')
406-
.directive('uiSref', uiSrefNg1)
407-
.directive('uiSrefActive', uiSrefActiveNg1)
408-
.directive('uiSrefActiveEq', uiSrefActiveNg1)
409-
.directive('uiState', uiStateNg1);
405+
.directive('uiSref', uiSref)
406+
.directive('uiSrefActive', uiSrefActive)
407+
.directive('uiSrefActiveEq', uiSrefActive)
408+
.directive('uiState', uiState);

src/ng1/directives/viewDirective.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export type UIViewData = {
155155
* });
156156
* ```
157157
*/
158-
let uiViewNg1 = ['$view', '$animate', '$uiViewScroll', '$interpolate', '$q',
158+
let uiView = ['$view', '$animate', '$uiViewScroll', '$interpolate', '$q',
159159
function $ViewDirective( $view, $animate, $uiViewScroll, $interpolate, $q) {
160160

161161
function getRenderer(attrs, scope) {
@@ -430,5 +430,5 @@ function registerControllerCallbacks($transitions: TransitionService, controller
430430
}
431431
}
432432

433-
angular.module('ui.router.state').directive('uiView', uiViewNg1);
433+
angular.module('ui.router.state').directive('uiView', uiView);
434434
angular.module('ui.router.state').directive('uiView', $ViewDirectiveFill);

0 commit comments

Comments
 (0)