@@ -8,9 +8,8 @@ import {HookResult} from "ui-router-core";
8
8
* The StateDeclaration object is used to define a state or nested state.
9
9
* It should be registered with the [[StateRegistry]].
10
10
*
11
- * @example
11
+ * #### Example:
12
12
* ```js
13
- *
14
13
* // StateDeclaration object
15
14
* var foldersState = {
16
15
* name: 'folders',
@@ -88,9 +87,8 @@ export interface Ng1StateDeclaration extends StateDeclaration, Ng1ViewDeclaratio
88
87
*
89
88
* Targets three named ui-views in the parent state's template
90
89
*
91
- * @example
90
+ * #### Example:
92
91
* ```js
93
- *
94
92
* views: {
95
93
* header: {
96
94
* controller: "headerCtrl",
@@ -104,9 +102,8 @@ export interface Ng1StateDeclaration extends StateDeclaration, Ng1ViewDeclaratio
104
102
* }
105
103
* ```
106
104
*
107
- * @example
105
+ * #### Example:
108
106
* ```js
109
- *
110
107
* // Targets named ui-view="header" in the template of the ancestor state 'top'
111
108
* // and the named `ui-view="body" from the parent state's template.
112
109
* views: {
@@ -130,9 +127,8 @@ export interface Ng1StateDeclaration extends StateDeclaration, Ng1ViewDeclaratio
130
127
*
131
128
* Addresses without an `@` are anchored to the parent state.
132
129
*
133
- * @example
130
+ * #### Example:
134
131
* ```js
135
- *
136
132
* // target the `<div ui-view='foo'></div>` created in the parent state's view
137
133
* views: { foo: {...} }
138
134
* ```
@@ -155,9 +151,8 @@ export interface Ng1StateDeclaration extends StateDeclaration, Ng1ViewDeclaratio
155
151
* You can address a `ui-view` absolutely, using dotted notation, by prefixing the address with a `!`. Dotted
156
152
* addresses map to the hierarchy of `ui-view`s active in the DOM:
157
153
*
158
- * @example
154
+ * #### Example:
159
155
* ```js
160
- *
161
156
* // absolutely target the `<div ui-view='nested'></div>`... which was created
162
157
* // in the unnamed/$default root `<ui-view></ui-view>`
163
158
* views: { '!$default.nested': {...} }
@@ -168,18 +163,16 @@ export interface Ng1StateDeclaration extends StateDeclaration, Ng1ViewDeclaratio
168
163
* Absolute addressing is actually relative addressing, only anchored to the unnamed root state. You can also use
169
164
* relative addressing anchored to any state, in order to target a target deeply nested `ui-views`:
170
165
*
171
- * @example
166
+ * #### Example:
172
167
* ```js
173
168
*
174
- *
175
169
* // target the `<div ui-view='bar'></div>`... which was created inside the
176
170
* // `<div ui-view='bar'></div>`... which was created inside the parent state's template.
177
171
* views: { 'foo.bar': {...} }
178
172
* ```
179
173
*
180
- * @example
174
+ * #### Example:
181
175
* ```js
182
- *
183
176
* // target the `<div ui-view='bar'></div>`... which was created in
184
177
* // `<div ui-view='foo'></div>`... which was created in a template crom the state `baz.qux`
185
178
* views: { 'foo.bar@baz.qux': {...} }
@@ -230,9 +223,8 @@ export interface Ng1ViewDeclaration extends _ViewDeclaration {
230
223
*
231
224
* Note: Mapping from resolve names to component inputs may be specified using [[bindings]].
232
225
*
233
- * @example
226
+ * #### Example:
234
227
* ```js
235
- *
236
228
* .state('profile', {
237
229
* // Use the <my-profile></my-profile> component for the Unnamed view
238
230
* component: 'MyProfile',
@@ -281,9 +273,8 @@ export interface Ng1ViewDeclaration extends _ViewDeclaration {
281
273
* Any component bindings that are omitted from this map get the default behavior of mapping to a resolve of the
282
274
* same name.
283
275
*
284
- * @example
276
+ * #### Example:
285
277
* ```js
286
- *
287
278
* $stateProvider.state('foo', {
288
279
* resolve: {
289
280
* foo: function(FooService) { return FooService.get(); },
@@ -344,9 +335,8 @@ export interface Ng1ViewDeclaration extends _ViewDeclaration {
344
335
* of a registered controller. The provider will invoked during a Transition in which the view's state is
345
336
* entered. The provider is called after the resolve data is fetched.
346
337
*
347
- * @example
338
+ * #### Example:
348
339
* ```js
349
- *
350
340
* controllerProvider: function(MyResolveData, $transition$) {
351
341
* if (MyResolveData.foo) {
352
342
* return "FooCtrl"
@@ -386,15 +376,13 @@ export interface Ng1ViewDeclaration extends _ViewDeclaration {
386
376
*
387
377
* If `template` is a function, it will be called with the Transition parameters as the first argument.
388
378
*
389
- * @example
379
+ * #### Example:
390
380
* ```js
391
- *
392
381
* template: "<h1>inline template definition</h1><div ui-view></div>"
393
382
* ```
394
383
*
395
- * @example
384
+ * #### Example:
396
385
* ```js
397
- *
398
386
* template: function(params) {
399
387
* return "<h1>generated template</h1>";
400
388
* }
@@ -412,15 +400,13 @@ export interface Ng1ViewDeclaration extends _ViewDeclaration {
412
400
*
413
401
* If `templateUrl` is a function, it will be called with the Transition parameters as the first argument.
414
402
*
415
- * @example
403
+ * #### Example:
416
404
* ```js
417
- *
418
405
* templateUrl: "/templates/home.html"
419
406
* ```
420
407
*
421
- * @example
408
+ * #### Example:
422
409
* ```js
423
- *
424
410
* templateUrl: function(params) {
425
411
* return myTemplates[params.pageId];
426
412
* }
@@ -436,9 +422,8 @@ export interface Ng1ViewDeclaration extends _ViewDeclaration {
436
422
* Injected function which returns the HTML template.
437
423
* The template will be used to render the corresponding [[ui-view]] directive.
438
424
*
439
- * @example
425
+ * #### Example:
440
426
* ```js
441
- *
442
427
* templateProvider: function(MyTemplateService, $transition$) {
443
428
* return MyTemplateService.getTemplate($transition$.params().pageId);
444
429
* }
@@ -516,9 +501,8 @@ export interface Ng1Controller {
516
501
* - Anything else: the transition will continue normally (the state and view will be deactivated)
517
502
*
518
503
*
519
- * @example
504
+ * #### Example:
520
505
* ```js
521
- *
522
506
* app.component('myComponent', {
523
507
* template: '<input ng-model="$ctrl.data" type="text">',
524
508
* bindings: { 'data': '<' },
0 commit comments