3
3
*
4
4
* These directives are used in templates to create viewports and navigate to states
5
5
*
6
- * @preferred @module ng1_directives
6
+ * @ng 1api @ preferred @module directives
7
7
*/ /** for typedoc */
8
8
import { ng as angular } from "../angular" ;
9
9
import { IAugmentedJQuery , ITimeoutService , IScope , IInterpolateService } from "angular" ;
@@ -14,6 +14,9 @@ import {
14
14
} from "ui-router-core" ;
15
15
import { UIViewData } from "./viewDirective" ;
16
16
17
+ /** @hidden Used for typedoc */
18
+ export interface ng1_directive { }
19
+
17
20
/** @hidden */
18
21
function parseStateRef ( ref : string ) {
19
22
let paramsOnly = ref . match ( / ^ \s * ( { [ ^ } ] * } ) \s * $ / ) , parsed ;
@@ -211,7 +214,8 @@ function defaultOpts(el: IAugmentedJQuery, $state: StateService) {
211
214
* - Unlike the parameter values expression, the state name is not `$watch`ed (for performance reasons).
212
215
* If you need to dynamically update the state being linked to, use the fully dynamic [[uiState]] directive.
213
216
*/
214
- let uiSref = [ '$uiRouter' , '$timeout' ,
217
+ let uiSref : ng1_directive ;
218
+ uiSref = [ '$uiRouter' , '$timeout' ,
215
219
function $StateRefDirective ( $uiRouter : UIRouter , $timeout : ITimeoutService ) {
216
220
let $state = $uiRouter . stateService ;
217
221
@@ -334,7 +338,8 @@ let uiSref = ['$uiRouter', '$timeout',
334
338
* - A middle-click, right-click, or ctrl-click is handled (natively) by the browser to open the href in a new window, for example.
335
339
* ```
336
340
*/
337
- let uiState = [ '$uiRouter' , '$timeout' ,
341
+ let uiState : ng1_directive ;
342
+ uiState = [ '$uiRouter' , '$timeout' ,
338
343
function $StateRefDynamicDirective ( $uiRouter : UIRouter , $timeout : ITimeoutService ) {
339
344
let $state = $uiRouter . stateService ;
340
345
@@ -469,7 +474,8 @@ let uiState = ['$uiRouter', '$timeout',
469
474
*
470
475
* - Multiple classes may be specified in a space-separated format: `ui-sref-active='class1 class2 class3'`
471
476
*/
472
- let uiSrefActive = [ '$state' , '$stateParams' , '$interpolate' , '$uiRouter' ,
477
+ let uiSrefActive : ng1_directive ;
478
+ uiSrefActive = [ '$state' , '$stateParams' , '$interpolate' , '$uiRouter' ,
473
479
function $StateRefActiveDirective ( $state : StateService , $stateParams : Obj , $interpolate : IInterpolateService , $uiRouter : UIRouter ) {
474
480
return {
475
481
restrict : "A" ,
@@ -564,7 +570,9 @@ let uiSrefActive = ['$state', '$stateParams', '$interpolate', '$uiRouter',
564
570
} ;
565
571
} ] ;
566
572
573
+ /** @hidden */
567
574
interface Def { uiState : string ; href : string ; uiStateParams : Obj ; uiStateOpts : any ; }
575
+ /** @hidden */
568
576
interface StateData { state : StateDeclaration ; params : RawParams ; activeClass : string ; }
569
577
570
578
angular . module ( 'ui.router.state' )
0 commit comments