@angular-wave/angular.ts 0.0.28 → 0.0.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/angular-ts.esm.js +1 -1
  2. package/dist/angular-ts.umd.js +1 -1
  3. package/index.html +2 -2
  4. package/package.json +1 -1
  5. package/src/core/controller.js +3 -0
  6. package/src/directive/controller.js +0 -56
  7. package/src/directive/controller.md +46 -0
  8. package/src/router/common/trace.js +7 -7
  9. package/src/router/directives/state-directives.js +75 -75
  10. package/src/router/directives/view-directive.js +21 -21
  11. package/src/router/hooks/update-globals.js +1 -1
  12. package/src/router/index.js +12 -12
  13. package/src/router/injectables.js +11 -11
  14. package/src/router/resolve/resolve-context.js +1 -1
  15. package/src/router/router.js +8 -77
  16. package/src/router/services.js +5 -43
  17. package/src/router/state/state-builder.js +1 -0
  18. package/src/router/state/state-object.js +1 -1
  19. package/src/router/state/state-registry.js +56 -3
  20. package/src/router/state/state-service.js +16 -25
  21. package/src/router/state/target-state.js +1 -1
  22. package/src/router/state/views.js +5 -5
  23. package/src/router/state-filters.js +0 -2
  24. package/src/router/state-provider.js +0 -2
  25. package/src/router/template-factory.js +4 -4
  26. package/src/router/transition/transition-service.js +2 -3
  27. package/src/router/url/url-config.js +0 -2
  28. package/src/router/url/url-matcher-factory.js +0 -1
  29. package/src/router/url/url-matcher.js +0 -8
  30. package/src/router/url/url-router.js +4 -0
  31. package/src/router/url/url-service.js +6 -6
  32. package/src/router/view/view.js +67 -65
  33. package/src/services/browser.js +1 -5
  34. package/src/shared/common.js +1 -1
  35. package/test/core/pubsub.spec.js +73 -0
  36. package/test/module-test.html +5 -5
  37. package/test/original-test.html +3 -3
  38. package/test/router/services.spec.js +1 -1
  39. package/test/router/state-directives.spec.js +72 -80
  40. package/test/router/state-filter.spec.js +6 -4
  41. package/test/router/state.spec.js +15 -13
  42. package/test/router/template-factory.spec.js +4 -4
  43. package/test/router/url-matcher-factory.spec.js +2 -2
  44. package/test/router/view-directive.spec.js +165 -163
  45. package/test/router/view-hook.spec.js +2 -2
  46. package/test/router/view-scroll.spec.js +14 -14
  47. package/test/router/view.spec.js +2 -2
  48. package/types/router/core/common/coreservices.d.ts +2 -2
  49. package/types/router/core/common/trace.d.ts +7 -7
  50. package/types/router/core/globals.d.ts +2 -1
  51. package/types/router/core/interface.d.ts +3 -10
  52. package/types/router/core/params/interface.d.ts +3 -3
  53. package/types/router/core/resolve/resolveContext.d.ts +4 -4
  54. package/types/router/core/router.d.ts +5 -51
  55. package/types/router/core/state/interface.d.ts +12 -12
  56. package/types/router/core/state/stateObject.d.ts +1 -1
  57. package/types/router/core/state/stateQueueManager.d.ts +2 -2
  58. package/types/router/core/state/stateRegistry.d.ts +5 -4
  59. package/types/router/core/state/stateService.d.ts +13 -13
  60. package/types/router/core/state/targetState.d.ts +1 -1
  61. package/types/router/core/transition/interface.d.ts +2 -2
  62. package/types/router/core/transition/transition.d.ts +12 -12
  63. package/types/router/core/transition/transitionService.d.ts +5 -5
  64. package/types/router/core/url/interface.d.ts +3 -3
  65. package/types/router/core/url/urlConfig.d.ts +3 -3
  66. package/types/router/core/url/urlMatcherFactory.d.ts +3 -3
  67. package/types/router/core/url/urlRouter.d.ts +2 -2
  68. package/types/router/core/url/urlRule.d.ts +6 -6
  69. package/types/router/core/url/urlRules.d.ts +6 -6
  70. package/types/router/core/url/urlService.d.ts +8 -8
  71. package/types/router/core/view/interface.d.ts +3 -3
  72. package/types/router/core/view/view.d.ts +26 -26
  73. package/types/router/directives/viewDirective.d.ts +6 -6
  74. package/types/router/interface.d.ts +8 -8
  75. package/types/router/locationServices.d.ts +3 -3
  76. package/types/router/services.d.ts +1 -1
  77. package/types/router/stateProvider.d.ts +5 -5
  78. package/types/router/statebuilders/views.d.ts +1 -1
  79. package/types/router/templateFactory.d.ts +2 -2
  80. package/types/router/viewScroll.d.ts +2 -2
@@ -15,8 +15,8 @@ import { StateObject } from "../state/stateObject";
15
15
  import { TargetState } from "../state/targetState";
16
16
  import { Resolvable } from "../resolve/resolvable";
17
17
  import { ViewConfig } from "../view/interface";
18
- import { UIRouter } from "../router";
19
- import { UIInjector } from "../interface";
18
+ import { Router } from "../router";
19
+ import { NGInjector } from "../interface";
20
20
  import { ResolvableLiteral } from "../resolve/interface";
21
21
  import { Rejection } from "./rejectFactory";
22
22
  /**
@@ -37,11 +37,11 @@ export declare class Transition implements IHookRegistry {
37
37
  */
38
38
  $id: number;
39
39
  /**
40
- * A reference to the [[UIRouter]] instance
40
+ * A reference to the [[Router]] instance
41
41
  *
42
42
  * This reference can be used to access the router services, such as the [[StateService]]
43
43
  */
44
- router: UIRouter;
44
+ router: Router;
45
45
  /** @internal */
46
46
  private _deferred;
47
47
  /**
@@ -139,10 +139,10 @@ export declare class Transition implements IHookRegistry {
139
139
  * @param fromPath The path of [[PathNode]]s from which the transition is leaving. The last node in the `fromPath`
140
140
  * encapsulates the "from state".
141
141
  * @param targetState The target state and parameters being transitioned to (also, the transition options)
142
- * @param router The [[UIRouter]] instance
142
+ * @param router The [[Router]] instance
143
143
  * @internal
144
144
  */
145
- constructor(fromPath: PathNode[], targetState: TargetState, router: UIRouter);
145
+ constructor(fromPath: PathNode[], targetState: TargetState, router: Router);
146
146
  private applyViewConfigs;
147
147
  /**
148
148
  * @internal
@@ -283,12 +283,12 @@ export declare class Transition implements IHookRegistry {
283
283
  };
284
284
  paramsChanged<T>(): T;
285
285
  /**
286
- * Creates a [[UIInjector]] Dependency Injector
286
+ * Creates a [[NGInjector]] Dependency Injector
287
287
  *
288
288
  * Returns a Dependency Injector for the Transition's target state (to state).
289
289
  * The injector provides resolve values which the target state has access to.
290
290
  *
291
- * The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).
291
+ * The `NGInjector` can also provide values from the native root/global injector (ng1/ng2).
292
292
  *
293
293
  * #### Example:
294
294
  * ```js
@@ -300,7 +300,7 @@ export declare class Transition implements IHookRegistry {
300
300
  * ```
301
301
  *
302
302
  * In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched.
303
- * You can use [[UIInjector.getAsync]] to get a promise for the data.
303
+ * You can use [[NGInjector.getAsync]] to get a promise for the data.
304
304
  * #### Example:
305
305
  * ```js
306
306
  * .onBefore({}, trans => {
@@ -335,9 +335,9 @@ export declare class Transition implements IHookRegistry {
335
335
  * @param state Limits the resolves provided to only the resolves the provided state has access to.
336
336
  * @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states.
337
337
  *
338
- * @returns a [[UIInjector]]
338
+ * @returns a [[NGInjector]]
339
339
  */
340
- injector(state?: StateOrName, pathName?: string): UIInjector;
340
+ injector(state?: StateOrName, pathName?: string): NGInjector;
341
341
  /**
342
342
  * Gets all available resolve tokens (keys)
343
343
  *
@@ -376,7 +376,7 @@ export declare class Transition implements IHookRegistry {
376
376
  *
377
377
  * Allows a transition hook to dynamically add a Resolvable to this Transition.
378
378
  *
379
- * Use the [[Transition.injector]] to retrieve the resolved data in subsequent hooks ([[UIInjector.get]]).
379
+ * Use the [[Transition.injector]] to retrieve the resolved data in subsequent hooks ([[NGInjector.get]]).
380
380
  *
381
381
  * If a `state` argument is provided, the Resolvable is processed when that state is being entered.
382
382
  * If no `state` is provided then the root state is used.
@@ -17,7 +17,7 @@ import { RegisteredHook } from "./hookRegistry";
17
17
  import { TargetState } from "../state/targetState";
18
18
  import { PathNode } from "../path/pathNode";
19
19
  import { ViewService } from "../view/view";
20
- import { UIRouter } from "../router";
20
+ import { Router } from "../router";
21
21
  import { TransitionEventType } from "./transitionEventType";
22
22
  import { GetResultHandler, GetErrorHandler } from "./transitionHook";
23
23
  /**
@@ -77,9 +77,9 @@ export interface TransitionServicePluginAPI {
77
77
  * - It allows the default transition error handler to be set.
78
78
  * - It also has a factory function for creating new [[Transition]] objects, (used internally by the [[StateService]]).
79
79
  *
80
- * At bootstrap, [[UIRouter]] creates a single instance (singleton) of this class.
80
+ * At bootstrap, [[Router]] creates a single instance (singleton) of this class.
81
81
  *
82
- * This API is located at `router.transitionService` ([[UIRouter.transitionService]])
82
+ * This API is located at `router.transitionService` ([[Router.transitionService]])
83
83
  */
84
84
  export declare class TransitionService implements IHookRegistry {
85
85
  /** @internal */
@@ -119,7 +119,7 @@ export declare class TransitionService implements IHookRegistry {
119
119
  lazyLoad: Function;
120
120
  };
121
121
  /** @internal */
122
- constructor(_router: UIRouter);
122
+ constructor(_router: Router);
123
123
  /**
124
124
  * Registers a [[TransitionHookFn]], called *while a transition is being constructed*.
125
125
  *
@@ -200,7 +200,7 @@ export declare class TransitionService implements IHookRegistry {
200
200
  * dispose
201
201
  * @internal
202
202
  */
203
- dispose(router: UIRouter): void;
203
+ dispose(router: Router): void;
204
204
  /**
205
205
  * Creates a new [[Transition]] object
206
206
  *
@@ -9,7 +9,7 @@
9
9
  * @preferred
10
10
  */
11
11
  import { LocationConfig } from "../common";
12
- import { UIRouter } from "../router";
12
+ import { Router } from "../router";
13
13
  import {
14
14
  StateDeclaration,
15
15
  StateObject,
@@ -83,7 +83,7 @@ export interface MatchResult {
83
83
  * @return the matched value, either truthy or falsey
84
84
  */
85
85
  export interface UrlRuleMatchFn {
86
- (url?: UrlParts, router?: UIRouter): any;
86
+ (url?: UrlParts, router?: Router): any;
87
87
  }
88
88
  /**
89
89
  * Handler invoked when a rule is matched
@@ -98,7 +98,7 @@ export interface UrlRuleHandlerFn {
98
98
  (
99
99
  matchValue?: any,
100
100
  url?: UrlParts,
101
- router?: UIRouter,
101
+ router?: Router,
102
102
  ): string | TargetState | TargetStateDef | void;
103
103
  }
104
104
  /** @internal */
@@ -1,4 +1,4 @@
1
- import { UIRouter } from "../router";
1
+ import { Router } from "../router";
2
2
  import { ParamTypeDefinition, ParamTypes } from "../params";
3
3
  /**
4
4
  * An API to customize the URL behavior and retrieve URL configuration
@@ -11,7 +11,7 @@ import { ParamTypeDefinition, ParamTypes } from "../params";
11
11
  * This information can be used to build absolute URLs, such as
12
12
  * `https://example.com:443/basepath/state/substate?param1=a#hashvalue`;
13
13
  *
14
- * This API is found at `router.urlService.config` (see: [[UIRouter.urlService]], [[URLService.config]])
14
+ * This API is found at `router.urlService.config` (see: [[Router.urlService]], [[URLService.config]])
15
15
  */
16
16
  export declare class UrlConfig {
17
17
  private router;
@@ -20,7 +20,7 @@ export declare class UrlConfig {
20
20
  /** @internal */ _isCaseInsensitive: boolean;
21
21
  /** @internal */ _isStrictMode: boolean;
22
22
  /** @internal */ _defaultSquashPolicy: boolean | string;
23
- /** @internal */ constructor(/** @internal */ router: UIRouter);
23
+ /** @internal */ constructor(/** @internal */ router: Router);
24
24
  /** @internal */ dispose: () => void;
25
25
  /**
26
26
  * Gets the base Href, e.g., `http://localhost/approot/`
@@ -2,13 +2,13 @@ import { UrlMatcher } from "./urlMatcher";
2
2
  import { Param, ParamType, ParamTypeDefinition } from "../params";
3
3
  import { UrlMatcherCompileConfig } from "./interface";
4
4
  import { StateDeclaration } from "../state";
5
- import { UIRouter } from "../router";
5
+ import { Router } from "../router";
6
6
  export declare class ParamFactory {
7
7
  private router;
8
8
  fromConfig(id: string, type: ParamType, state: StateDeclaration): Param;
9
9
  fromPath(id: string, type: ParamType, state: StateDeclaration): Param;
10
10
  fromSearch(id: string, type: ParamType, state: StateDeclaration): Param;
11
- constructor(router: UIRouter);
11
+ constructor(router: Router);
12
12
  }
13
13
  /**
14
14
  * Factory for [[UrlMatcher]] instances.
@@ -22,7 +22,7 @@ export declare class UrlMatcherFactory {
22
22
  paramFactory: ParamFactory;
23
23
  UrlMatcher: typeof UrlMatcher;
24
24
  Param: typeof Param;
25
- constructor(/** @internal */ router: UIRouter);
25
+ constructor(/** @internal */ router: Router);
26
26
  /**
27
27
  * Creates a [[UrlMatcher]] for the specified pattern.
28
28
  *
@@ -1,6 +1,6 @@
1
1
  import { UrlMatcher } from "./urlMatcher";
2
2
  import { RawParams } from "../params";
3
- import { UIRouter } from "../router";
3
+ import { Router } from "../router";
4
4
  import { UrlRuleFactory } from "./urlRule";
5
5
  import { MatchResult, UrlParts, UrlRule, UrlRuleHandlerFn } from "./interface";
6
6
  import { TargetState, TargetStateDef } from "../state";
@@ -18,7 +18,7 @@ export declare class UrlRouter {
18
18
  urlRuleFactory: UrlRuleFactory;
19
19
  /** @internal */ private location;
20
20
  /** @internal */
21
- constructor(/** @internal */ router: UIRouter);
21
+ constructor(/** @internal */ router: Router);
22
22
  /** Internal API. */
23
23
  update(read?: boolean): void;
24
24
  /**
@@ -1,6 +1,6 @@
1
1
  import { StateDeclaration } from "../state";
2
2
  import { UrlMatcher } from "./urlMatcher";
3
- import { UIRouter } from "../router";
3
+ import { Router } from "../router";
4
4
  import { StateObject } from "../state/stateObject";
5
5
  import {
6
6
  UrlRule,
@@ -22,9 +22,9 @@ import {
22
22
  * - [[StateObject]]
23
23
  */
24
24
  export declare class UrlRuleFactory {
25
- router: UIRouter;
25
+ router: Router;
26
26
  static isUrlRule: (obj: any) => boolean;
27
- constructor(router: UIRouter);
27
+ constructor(router: Router);
28
28
  compile(str: string): UrlMatcher;
29
29
  create(
30
30
  what:
@@ -47,7 +47,7 @@ export declare class UrlRuleFactory {
47
47
  *
48
48
  * - matched parameter values ([[RawParams]] from [[UrlMatcher.exec]])
49
49
  * - url: the current Url ([[UrlParts]])
50
- * - router: the router object ([[UIRouter]])
50
+ * - router: the router object ([[Router]])
51
51
  *
52
52
  * #### Example:
53
53
  * ```js
@@ -89,7 +89,7 @@ export declare class UrlRuleFactory {
89
89
  */
90
90
  fromState(
91
91
  stateOrDecl: StateObject | StateDeclaration,
92
- router: UIRouter,
92
+ router: Router,
93
93
  ): StateRule;
94
94
  /**
95
95
  * A UrlRule which matches based on a regular expression
@@ -102,7 +102,7 @@ export declare class UrlRuleFactory {
102
102
  *
103
103
  * - regexp match array (from `regexp`)
104
104
  * - url: the current Url ([[UrlParts]])
105
- * - router: the router object ([[UIRouter]])
105
+ * - router: the router object ([[Router]])
106
106
  *
107
107
  * #### Example:
108
108
  * ```js
@@ -1,4 +1,4 @@
1
- import { UIRouter } from "../router";
1
+ import { Router } from "../router";
2
2
  import { UrlRule, UrlRuleHandlerFn } from "./interface";
3
3
  import { TargetState, TargetStateDef } from "../state";
4
4
  import { UrlMatcher } from "./urlMatcher";
@@ -11,7 +11,7 @@ import { UrlRuleFactory } from "./urlRule";
11
11
  *
12
12
  * The most commonly used methods are [[otherwise]] and [[when]].
13
13
  *
14
- * This API is found at `router.urlService.rules` (see: [[UIRouter.urlService]], [[URLService.rules]])
14
+ * This API is found at `router.urlService.rules` (see: [[Router.urlService]], [[URLService.rules]])
15
15
  */
16
16
  export declare class UrlRules {
17
17
  private router;
@@ -23,9 +23,9 @@ export declare class UrlRules {
23
23
  /** @internal */ private _rules;
24
24
  /** @internal */ private _id;
25
25
  /** @internal */
26
- constructor(/** @internal */ router: UIRouter);
26
+ constructor(/** @internal */ router: Router);
27
27
  /** @internal */
28
- dispose(router?: UIRouter): void;
28
+ dispose(router?: Router): void;
29
29
  /**
30
30
  * Defines the initial state, path, or behavior to use when the app starts.
31
31
  *
@@ -86,7 +86,7 @@ export declare class UrlRules {
86
86
  * .otherwise({ state: 'home', params: { dashboard: 'default' } });
87
87
  * ```
88
88
  *
89
- * - If `handler` is a function, the function receives the current url ([[UrlParts]]) and the [[UIRouter]] object.
89
+ * - If `handler` is a function, the function receives the current url ([[UrlParts]]) and the [[Router]] object.
90
90
  * The function can perform actions, and/or return a value.
91
91
  *
92
92
  * #### Example:
@@ -220,7 +220,7 @@ export declare class UrlRules {
220
220
  *
221
221
  * ---
222
222
  *
223
- * When the handler is a function, it receives the matched value, the current URL, and the `UIRouter` object (See [[UrlRuleHandlerFn]]).
223
+ * When the handler is a function, it receives the matched value, the current URL, and the `Router` object (See [[UrlRuleHandlerFn]]).
224
224
  * The "matched value" differs based on the `matcher`.
225
225
  * For [[UrlMatcher]]s, it will be the matched state params.
226
226
  * For `RegExp`, it will be the match array from `regexp.exec()`.
@@ -1,4 +1,4 @@
1
- import { UIRouter } from "../router";
1
+ import { Router } from "../router";
2
2
  import { LocationServices } from "../common";
3
3
  import { MatchResult, UrlParts, UrlSyncApi } from "./interface";
4
4
  import { UrlRules } from "./urlRules";
@@ -23,7 +23,7 @@ export declare class UrlService implements LocationServices, UrlSyncApi {
23
23
  */
24
24
  config: UrlConfig;
25
25
  /** @internal */
26
- constructor(/** @internal */ router: UIRouter);
26
+ constructor(/** @internal */ router: Router);
27
27
 
28
28
  /**
29
29
  * Gets the current URL parts
@@ -56,9 +56,9 @@ export declare class UrlService implements LocationServices, UrlSyncApi {
56
56
  * Starts or stops listening for URL changes
57
57
  *
58
58
  * Call this sometime after calling [[deferIntercept]] to start monitoring the url.
59
- * This causes UI-Router to start listening for changes to the URL, if it wasn't already listening.
59
+ * This causes Router to start listening for changes to the URL, if it wasn't already listening.
60
60
  *
61
- * If called with `false`, UI-Router will stop listening (call listen(true) to start listening again).
61
+ * If called with `false`, Router will stop listening (call listen(true) to start listening again).
62
62
  *
63
63
  * #### Example:
64
64
  * ```js
@@ -78,15 +78,15 @@ export declare class UrlService implements LocationServices, UrlSyncApi {
78
78
  /**
79
79
  * Disables monitoring of the URL.
80
80
  *
81
- * Call this method before UI-Router has bootstrapped.
82
- * It will stop UI-Router from performing the initial url sync.
81
+ * Call this method before Router has bootstrapped.
82
+ * It will stop Router from performing the initial url sync.
83
83
  *
84
84
  * This can be useful to perform some asynchronous initialization before the router starts.
85
- * Once the initialization is complete, call [[listen]] to tell UI-Router to start watching and synchronizing the URL.
85
+ * Once the initialization is complete, call [[listen]] to tell Router to start watching and synchronizing the URL.
86
86
  *
87
87
  * #### Example:
88
88
  * ```js
89
- * // Prevent UI-Router from automatically intercepting URL changes when it starts;
89
+ * // Prevent Router from automatically intercepting URL changes when it starts;
90
90
  * urlService.deferIntercept();
91
91
  *
92
92
  * fetch('/states.json').then(resp => resp.json()).then(data => {
@@ -5,7 +5,7 @@ export interface ViewContext {
5
5
  name: string;
6
6
  parent: ViewContext;
7
7
  }
8
- export interface ActiveUIView {
8
+ export interface ActiveNGView {
9
9
  /** type of framework, e.g., "ng1" or "ng2" */
10
10
  $type: string;
11
11
  /** An auto-incremented id */
@@ -31,8 +31,8 @@ export interface ActiveUIView {
31
31
  * with the `ViewConfig`. The `ui-view` then loads itself using the information found in the `ViewConfig`.
32
32
  *
33
33
  * A `ViewConfig` if matched with a `ui-view` by finding all `ui-view`s which were created in the
34
- * context named by the `uiViewContextAnchor`, and finding the `ui-view` or child `ui-view` that matches
35
- * the `uiViewName` address.
34
+ * context named by the `ngViewContextAnchor`, and finding the `ui-view` or child `ui-view` that matches
35
+ * the `ngViewName` address.
36
36
  */
37
37
  export interface ViewConfig {
38
38
  $id: number;
@@ -1,8 +1,8 @@
1
1
  import { TypedMap } from "../common/common";
2
2
  import { PathNode } from "../path/pathNode";
3
- import { ActiveUIView, ViewContext, ViewConfig } from "./interface";
3
+ import { ActiveNGView, ViewContext, ViewConfig } from "./interface";
4
4
  import { _ViewDeclaration } from "../state/interface";
5
- import { UIRouter } from "../router";
5
+ import { Router } from "../router";
6
6
  export declare type ViewConfigFactory = (
7
7
  path: PathNode[],
8
8
  decl: _ViewDeclaration,
@@ -10,14 +10,14 @@ export declare type ViewConfigFactory = (
10
10
  export interface ViewServicePluginAPI {
11
11
  _rootViewContext(context?: ViewContext): ViewContext;
12
12
  _viewConfigFactory(viewType: string, factory: ViewConfigFactory): any;
13
- /** @param id router.$id + "." + uiView.id */
14
- _registeredUIView(id: string): ActiveUIView;
15
- _registeredUIViews(): ActiveUIView[];
13
+ /** @param id router.$id + "." + ngView.id */
14
+ _registeredNGView(id: string): ActiveNGView;
15
+ _registeredNGViews(): ActiveNGView[];
16
16
  _activeViewConfigs(): ViewConfig[];
17
17
  _onSync(listener: ViewSyncListener): Function;
18
18
  }
19
19
  export interface ViewTuple {
20
- uiView: ActiveUIView;
20
+ ngView: ActiveNGView;
21
21
  viewConfig: ViewConfig;
22
22
  }
23
23
  export interface ViewSyncListener {
@@ -33,15 +33,15 @@ export interface ViewSyncListener {
33
33
  * The views from exited states are deactivated via [[deactivateViewConfig]].
34
34
  * (See: the [[registerActivateViews]] Transition Hook)
35
35
  *
36
- * - As `ui-view` components pop in and out of existence, they register themselves using [[registerUIView]].
36
+ * - As `ui-view` components pop in and out of existence, they register themselves using [[registerNGView]].
37
37
  *
38
- * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveUIView]])
38
+ * - When the [[sync]] function is called, the registered `ui-view`(s) ([[ActiveNGView]])
39
39
  * are configured with the matching [[ViewConfig]](s)
40
40
  *
41
41
  */
42
42
  export declare class ViewService {
43
43
  private router;
44
- /** @internal */ private _uiViews;
44
+ /** @internal */ private _ngViews;
45
45
  /** @internal */ private _viewConfigs;
46
46
  /** @internal */ private _rootContext;
47
47
  /** @internal */ private _viewConfigFactories;
@@ -81,7 +81,7 @@ export declare class ViewService {
81
81
  * </ui-view>
82
82
  * </ui-view>
83
83
  *
84
- * uiViews: [
84
+ * ngViews: [
85
85
  * { fqn: "$default", creationContext: { name: "" } },
86
86
  * { fqn: "$default.foo", creationContext: { name: "A" } },
87
87
  * { fqn: "$default.foo.$default", creationContext: { name: "A.B" } }
@@ -90,10 +90,10 @@ export declare class ViewService {
90
90
  *
91
91
  * These four view configs all match the ui-view with the fqn: "$default.foo.$default.bar":
92
92
  *
93
- * - ViewConfig1: { uiViewName: "bar", uiViewContextAnchor: "A.B.C" }
94
- * - ViewConfig2: { uiViewName: "$default.bar", uiViewContextAnchor: "A.B" }
95
- * - ViewConfig3: { uiViewName: "foo.$default.bar", uiViewContextAnchor: "A" }
96
- * - ViewConfig4: { uiViewName: "$default.foo.$default.bar", uiViewContextAnchor: "" }
93
+ * - ViewConfig1: { ngViewName: "bar", ngViewContextAnchor: "A.B.C" }
94
+ * - ViewConfig2: { ngViewName: "$default.bar", ngViewContextAnchor: "A.B" }
95
+ * - ViewConfig3: { ngViewName: "foo.$default.bar", ngViewContextAnchor: "A" }
96
+ * - ViewConfig4: { ngViewName: "$default.foo.$default.bar", ngViewContextAnchor: "" }
97
97
  *
98
98
  * Using ViewConfig3 as an example, it matches the ui-view with fqn "$default.foo.$default.bar" because:
99
99
  * - The ViewConfig's segmented target name is: [ "foo", "$default", "bar" ]
@@ -106,29 +106,29 @@ export declare class ViewService {
106
106
  * @internal
107
107
  */
108
108
  static matches: (
109
- uiViewsByFqn: TypedMap<ActiveUIView>,
110
- uiView: ActiveUIView,
109
+ ngViewsByFqn: TypedMap<ActiveNGView>,
110
+ ngView: ActiveNGView,
111
111
  ) => (viewConfig: ViewConfig) => boolean;
112
112
  /**
113
113
  * Normalizes a view's name from a state.views configuration block.
114
114
  *
115
115
  * This should be used by a framework implementation to calculate the values for
116
- * [[_ViewDeclaration.$uiViewName]] and [[_ViewDeclaration.$uiViewContextAnchor]].
116
+ * [[_ViewDeclaration.$ngViewName]] and [[_ViewDeclaration.$ngViewContextAnchor]].
117
117
  *
118
118
  * @param context the context object (state declaration) that the view belongs to
119
119
  * @param rawViewName the name of the view, as declared in the [[StateDeclaration.views]]
120
120
  *
121
- * @returns the normalized uiViewName and uiViewContextAnchor that the view targets
121
+ * @returns the normalized ngViewName and ngViewContextAnchor that the view targets
122
122
  */
123
- static normalizeUIViewTarget(
123
+ static normalizeNGViewTarget(
124
124
  context: ViewContext,
125
125
  rawViewName?: string,
126
126
  ): {
127
- uiViewName: string;
128
- uiViewContextAnchor: string;
127
+ ngViewName: string;
128
+ ngViewContextAnchor: string;
129
129
  };
130
130
  /** @internal */
131
- constructor(/** @internal */ router: UIRouter);
131
+ constructor(/** @internal */ router: Router);
132
132
  /** @internal */
133
133
  private _rootViewContext;
134
134
  /** @internal */
@@ -154,13 +154,13 @@ export declare class ViewService {
154
154
  * Note: the `ui-view` component uses the `ViewConfig` to determine what view should be loaded inside the `ui-view`,
155
155
  * and what the view's state context is.
156
156
  *
157
- * Note: There is no corresponding `deregisterUIView`.
158
- * A `ui-view` should hang on to the return value of `registerUIView` and invoke it to deregister itself.
157
+ * Note: There is no corresponding `deregisterNGView`.
158
+ * A `ui-view` should hang on to the return value of `registerNGView` and invoke it to deregister itself.
159
159
  *
160
- * @param uiView The metadata for a UIView
160
+ * @param ngView The metadata for a NGView
161
161
  * @return a de-registration function used when the view is destroyed.
162
162
  */
163
- registerUIView(uiView: ActiveUIView): () => void;
163
+ registerNGView(ngView: ActiveNGView): () => void;
164
164
  /**
165
165
  * Returns the list of views currently available on the page, by fully-qualified name.
166
166
  *
@@ -1,15 +1,15 @@
1
1
  /** @publicapi @module directives */ /** */
2
2
  import { IDirective } from "../..";
3
- import { ActiveUIView } from "../core";
3
+ import { ActiveNGView } from "../core";
4
4
  import { Ng1ViewConfig } from "../statebuilders/views";
5
5
 
6
6
  /** @hidden */
7
- export declare type UIViewData = {
7
+ export declare type NGViewData = {
8
8
  $cfg: Ng1ViewConfig;
9
- $uiView: ActiveUIView;
9
+ $ngView: ActiveNGView;
10
10
  };
11
11
  /** @hidden */
12
- export declare type UIViewAnimData = {
12
+ export declare type NGViewAnimData = {
13
13
  $animEnter: Promise<any>;
14
14
  $animLeave: Promise<any>;
15
15
  $$animLeave: {
@@ -27,7 +27,7 @@ export declare type UIViewAnimData = {
27
27
  * The ui-view can be targeted in a View using the name ([[Ng1StateDeclaration.views]]).
28
28
  *
29
29
  * - `autoscroll`: an expression. When it evaluates to true, the `ui-view` will be scrolled into view when it is activated.
30
- * Uses [[$uiViewScroll]] to do the scrolling.
30
+ * Uses [[$ngViewScroll]] to do the scrolling.
31
31
  *
32
32
  * - `onload`: Expression to evaluate whenever the view updates.
33
33
  *
@@ -141,4 +141,4 @@ export declare type UIViewAnimData = {
141
141
  * });
142
142
  * ```
143
143
  */
144
- export declare let uiView: IDirective;
144
+ export declare let ngView: IDirective;
@@ -251,7 +251,7 @@ export interface Ng1ViewDeclaration extends _ViewDeclaration {
251
251
  * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:
252
252
  *
253
253
  * The controller function, or the name of a registered controller. The controller function will be used
254
- * to control the contents of the [[directives.uiView]] directive.
254
+ * to control the contents of the [[directives.ngView]] directive.
255
255
  *
256
256
  * If specified as a string, controllerAs can be declared here, i.e., "FooController as foo" instead of in
257
257
  * a separate [[controllerAs]] property.
@@ -310,7 +310,7 @@ export interface Ng1ViewDeclaration extends _ViewDeclaration {
310
310
  * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:
311
311
  *
312
312
  * HTML template as a string, or a function which returns an html template as a string.
313
- * This template will be used to render the corresponding [[directives.uiView]] directive.
313
+ * This template will be used to render the corresponding [[directives.ngView]] directive.
314
314
  *
315
315
  * This property takes precedence over templateUrl.
316
316
  *
@@ -335,7 +335,7 @@ export interface Ng1ViewDeclaration extends _ViewDeclaration {
335
335
  * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:
336
336
  *
337
337
  * A path or a function that returns a path to an html template.
338
- * The template will be fetched and used to render the corresponding [[directives.uiView]] directive.
338
+ * The template will be fetched and used to render the corresponding [[directives.ngView]] directive.
339
339
  *
340
340
  * If `templateUrl` is a function, it will be called with the Transition parameters as the first argument.
341
341
  *
@@ -358,7 +358,7 @@ export interface Ng1ViewDeclaration extends _ViewDeclaration {
358
358
  * A property of [[Ng1StateDeclaration]] or [[Ng1ViewDeclaration]]:
359
359
  *
360
360
  * Injected function which returns the HTML template.
361
- * The template will be used to render the corresponding [[directives.uiView]] directive.
361
+ * The template will be used to render the corresponding [[directives.ngView]] directive.
362
362
  *
363
363
  * #### Example:
364
364
  * ```js
@@ -372,14 +372,14 @@ export interface Ng1ViewDeclaration extends _ViewDeclaration {
372
372
  /**
373
373
  * The shape of a controller for a view (and/or component), defining the controller callbacks.
374
374
  *
375
- * A view in UI-Router is comprised of either a `component` ([[Ng1ViewDeclaration.component]]) or a combination of a
375
+ * A view in Router is comprised of either a `component` ([[Ng1ViewDeclaration.component]]) or a combination of a
376
376
  * `template` (or `templateProvider`) and a `controller` (or `controllerProvider`).
377
377
  *
378
378
  * The `controller` object (or the `component`'s controller object) can define component-level controller callbacks,
379
- * which UI-Router will call at the appropriate times. These callbacks are similar to Transition Hooks
379
+ * which Router will call at the appropriate times. These callbacks are similar to Transition Hooks
380
380
  * ([[IHookRegistry]]), but are only called if the view is currently active.
381
381
  *
382
- * This interface defines the UI-Router component callbacks.
382
+ * This interface defines the Router component callbacks.
383
383
  *
384
384
  */
385
385
  export interface Ng1Controller {
@@ -468,7 +468,7 @@ export interface TemplateFactoryProvider {
468
468
  /**
469
469
  * Forces $templateFactory to use $http instead of $templateRequest.
470
470
  *
471
- * UI-Router uses `$templateRequest` by default on angular 1.3+.
471
+ * Router uses `$templateRequest` by default on angular 1.3+.
472
472
  * Use this method to choose to use `$http` instead.
473
473
  *
474
474
  * ---
@@ -1,8 +1,8 @@
1
1
  /** @publicapi @module ng1 */ /** */
2
- import { LocationConfig, LocationServices, UIRouter } from "./core";
2
+ import { LocationConfig, LocationServices, Router } from "./core";
3
3
  import { ILocationService, ILocationProvider, IWindowService } from "../index";
4
4
  /**
5
- * Implements UI-Router LocationServices and LocationConfig using Angular 1's $location service
5
+ * Implements Router LocationServices and LocationConfig using Angular 1's $location service
6
6
  * @internalapi
7
7
  */
8
8
  export declare class Ng1LocationServices
@@ -34,7 +34,7 @@ export declare class Ng1LocationServices
34
34
  *
35
35
  * @param router
36
36
  */
37
- static monkeyPatchPathParameterType(router: UIRouter): void;
37
+ static monkeyPatchPathParameterType(router: Router): void;
38
38
  constructor($locationProvider: ILocationProvider);
39
39
  onChange(callback: Function): () => Function[];
40
40
  html5Mode(): any;
@@ -2,7 +2,7 @@ import { IRootScopeService } from "../";
2
2
  import { ResolveContext, TypedMap } from "./core";
3
3
  import { StateProvider } from "./stateProvider";
4
4
  declare module "./core/lib/router" {
5
- interface UIRouter {
5
+ interface Router {
6
6
  /** @hidden */
7
7
  stateProvider: StateProvider;
8
8
  }