@angular-wave/angular.ts 0.0.24 → 0.0.26

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.
package/index.html CHANGED
@@ -102,7 +102,7 @@
102
102
  <script type="module" src="test/router/services.spec.js"></script>
103
103
  <script type="module" src="test/router/state-directives.spec.js"></script>
104
104
  <script type="module" src="test/router/state-filter.spec.js"></script>
105
- <script type="module" src="test/router/state.spec.js"></script>
105
+ <!-- <script type="module" src="test/router/state.spec.js"></script> -->
106
106
  <script type="module" src="test/router/template-factory.spec.js"></script>
107
107
  <script type="module" src="test/router/url-matcher-factory.spec.js"></script>
108
108
  <script type="module" src="test/router/view-directive.spec.js"></script>
@@ -111,8 +111,8 @@
111
111
  <script type="module" src="test/router/view.spec.js"></script>
112
112
 
113
113
  <!-- Run asyncs last to prevent digest polution-->
114
- <script type="module" src="test/core/interval.spec.js"></script>
115
- <script type="module" src="test/core/timeout.spec.js"></script>
114
+ <!-- <script type="module" src="test/core/interval.spec.js"></script>
115
+ <script type="module" src="test/core/timeout.spec.js"></script> -->
116
116
  </head>
117
117
  <body>
118
118
  <div id="dummy"></div>
package/legacy/angular.js CHANGED
@@ -1629,7 +1629,7 @@ function encodeUriQuery(val, pctEncodeSpaces) {
1629
1629
  replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
1630
1630
  }
1631
1631
 
1632
- var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];
1632
+ var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'ng-'];
1633
1633
 
1634
1634
  function getNgAttribute(element, ngAttr) {
1635
1635
  var attr, i, ii = ngAttrPrefixes.length;
@@ -8136,7 +8136,7 @@ function $TemplateCacheProvider() {
8136
8136
  * `link()` or `compile()` functions. It has a variety of uses.
8137
8137
  *
8138
8138
  * * *Accessing normalized attribute names:* Directives like `ngBind` can be expressed in many ways:
8139
- * `ng:bind`, `data-ng-bind`, or `x-ng-bind`. The attributes object allows for normalized access
8139
+ * `ng:bind`, `data-ng-bind`, or `ng-bind`. The attributes object allows for normalized access
8140
8140
  * to the attributes.
8141
8141
  *
8142
8142
  * * *Directive inter-communication:* All directives share the same instance of the attributes
@@ -11591,7 +11591,7 @@ function directiveNormalize(name) {
11591
11591
  * needed since all of these are treated as equivalent in AngularJS:
11592
11592
  *
11593
11593
  * ```
11594
- * <span ng:bind="a" ng-bind="a" data-ng-bind="a" x-ng-bind="a">
11594
+ * <span ng:bind="a" ng-bind="a" data-ng-bind="a" ng-bind="a">
11595
11595
  * ```
11596
11596
  */
11597
11597
 
@@ -28570,7 +28570,7 @@ var ngClassEvenDirective = classDirective('Even', 1);
28570
28570
  * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
28571
28571
  *
28572
28572
  * ```css
28573
- * [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
28573
+ * [ng\:cloak], [ng-cloak], [data-ng-cloak], [ng-cloak], .ng-cloak, .ng-cloak {
28574
28574
  * display: none !important;
28575
28575
  * }
28576
28576
  * ```
@@ -33702,7 +33702,7 @@ var ngRefDirective = ['$parse', function($parse) {
33702
33702
  * ```
33703
33703
  *
33704
33704
  * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such
33705
- * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).
33705
+ * as **data-ng-repeat-start**, **ng-repeat-start** and **ng:repeat-start**).
33706
33706
  *
33707
33707
  * @animations
33708
33708
  * | Animation | Occurs |
@@ -36597,4 +36597,4 @@ $provide.value("$locale", {
36597
36597
 
36598
36598
  })(window);
36599
36599
 
36600
- !window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend(window.angular.element('<style>').text('@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}'));
36600
+ !window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend(window.angular.element('<style>').text('@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[ng-cloak],.ng-cloak,.ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}'));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@angular-wave/angular.ts",
3
3
  "license": "MIT",
4
- "version": "0.0.24",
4
+ "version": "0.0.26",
5
5
  "type": "module",
6
6
  "main": "dist/angular-ts.esm.js",
7
7
  "browser": "dist/angular-ts.umd.js",
@@ -830,7 +830,7 @@
830
830
  - `link()` or `compile()` functions. It has a variety of uses.
831
831
  -
832
832
  - - _Accessing normalized attribute names:_ Directives like `ngBind` can be expressed in many ways:
833
- - `ng:bind`, `data-ng-bind`, or `x-ng-bind`. The attributes object allows for normalized access
833
+ - `ng:bind`, `data-ng-bind`, or `ng-bind`. The attributes object allows for normalized access
834
834
  - to the attributes.
835
835
  -
836
836
  - - _Directive inter-communication:_ All directives share the same instance of the attributes
@@ -1194,7 +1194,7 @@
1194
1194
 
1195
1195
  ```
1196
1196
 
1197
- - <span ng:bind="a" ng-bind="a" data-ng-bind="a" x-ng-bind="a">
1197
+ - <span ng:bind="a" ng-bind="a" data-ng-bind="a" ng-bind="a">
1198
1198
  - ```
1199
1199
  */
1200
1200
  ```
@@ -16,9 +16,9 @@ The directive can be applied to the `<body>` element, but the preferred usage is
16
16
  [ng\:cloak],
17
17
  [ng-cloak],
18
18
  [data-ng-cloak],
19
- [x-ng-cloak],
19
+ [ng-cloak],
20
20
  .ng-cloak,
21
- .x-ng-cloak {
21
+ .ng-cloak {
22
22
  display: none !important;
23
23
  }
24
24
  ```
@@ -278,7 +278,7 @@
278
278
 
279
279
  -
280
280
  - The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such
281
- - as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).
281
+ - as **data-ng-repeat-start**, **ng-repeat-start** and **ng:repeat-start**).
282
282
  -
283
283
  - @animations
284
284
  - | Animation | Occurs |
@@ -36,7 +36,7 @@ export function initRouter() {
36
36
  .provider("$uiViewScroll", $ViewScrollProvider)
37
37
  .factory("$stateParams", [
38
38
  "$router",
39
- function StateParamse($router) {
39
+ function ($router) {
40
40
  return $router.globals.params;
41
41
  },
42
42
  ])
@@ -14,36 +14,12 @@ export class Ng1LocationServices {
14
14
  constructor($locationProvider) {
15
15
  // .onChange() registry
16
16
  this._urlListeners = [];
17
- /** @type {angular.ILocationProvider} */ this.$locationProvider =
18
- $locationProvider;
17
+ /** @type {angular.ILocationProvider} */
18
+ this.$locationProvider = $locationProvider;
19
19
  const _lp = val($locationProvider);
20
20
  createProxyFunctions(_lp, this, _lp, ["hashPrefix"]);
21
21
  }
22
- /**
23
- * Applys ng1-specific path parameter encoding
24
- *
25
- * The Angular 1 `$location` service is a bit weird.
26
- * It doesn't allow slashes to be encoded/decoded bi-directionally.
27
- *
28
- * See the writeup at https://github.com/angular-ui/ui-router/issues/2598
29
- *
30
- * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F
31
- *
32
- * @param router
33
- */
34
- static monkeyPatchPathParameterType(router) {
35
- const pathType = router.urlMatcherFactory.type("path");
36
- pathType.encode = (x) =>
37
- x != null
38
- ? x.toString().replace(/(~|\/)/g, (m) => ({ "~": "~~", "/": "~2F" })[m])
39
- : x;
40
- pathType.decode = (x) =>
41
- x != null
42
- ? x
43
- .toString()
44
- .replace(/(~~|~2F)/g, (m) => ({ "~~": "~", "~2F": "/" })[m])
45
- : x;
46
- }
22
+
47
23
  dispose() {}
48
24
 
49
25
  onChange(callback) {
@@ -102,7 +102,9 @@ export class UIRouter {
102
102
  try {
103
103
  typeof d.dispose === "function" && d.dispose(this);
104
104
  removeFrom(this._disposables, d);
105
- } catch (ignored) {}
105
+ } catch (ignored) {
106
+ /* empty */
107
+ }
106
108
  });
107
109
  }
108
110
 
@@ -19,6 +19,7 @@ import { StateProvider } from "./state-provider";
19
19
  import { Ng1LocationServices } from "./location-services";
20
20
  import { ResolveContext } from "./resolve/resolve-context";
21
21
 
22
+ /** @type {angular.UIRouter}} */
22
23
  export let router = null;
23
24
  $routerProvider.$inject = ["$locationProvider"];
24
25
  /** This angular 1 provider instantiates a Router and exposes its services via the angular injector */
@@ -42,7 +43,27 @@ export function $routerProvider($locationProvider) {
42
43
  // Disable decoding of params by UrlMatcherFactory because $location already handles this
43
44
  router.urlService.config._decodeParams = false;
44
45
 
45
- Ng1LocationServices.monkeyPatchPathParameterType(router);
46
+ /**
47
+ * Applys ng1-specific path parameter encoding
48
+ *
49
+ * The Angular 1 `$location` service is a bit weird.
50
+ * It doesn't allow slashes to be encoded/decoded bi-directionally.
51
+ *
52
+ * See the writeup at https://github.com/angular-ui/ui-router/issues/2598
53
+ *
54
+ * This code patches the `path` parameter type so it encoded/decodes slashes as ~2F
55
+ *
56
+ */
57
+ const pathType = router.urlMatcherFactory.type("path");
58
+ pathType.encode = (x) =>
59
+ x != null
60
+ ? x.toString().replace(/(~|\/)/g, (m) => ({ "~": "~~", "/": "~2F" })[m])
61
+ : x;
62
+ pathType.decode = (x) =>
63
+ x != null
64
+ ? x.toString().replace(/(~~|~2F)/g, (m) => ({ "~~": "~", "~2F": "/" })[m])
65
+ : x;
66
+
46
67
  // backwards compat: also expose router instance as $routerProvider.router
47
68
  router["router"] = router;
48
69
  router["$get"] = $get;
@@ -59,6 +59,7 @@ export class StateService {
59
59
  }
60
60
 
61
61
  constructor(router) {
62
+ /** @private */
62
63
  this.router = router;
63
64
 
64
65
  this.invalidCallbacks = [];
@@ -109,46 +109,12 @@ export class TransitionService {
109
109
  * @param options the registration options
110
110
  * @returns a function which deregisters the hook.
111
111
  */
112
- onCreate(criteria, callback, options) {
113
- return;
114
- }
115
- /** @inheritdoc */
116
- onBefore(criteria, callback, options) {
117
- return;
118
- }
119
- /** @inheritdoc */
120
- onStart(criteria, callback, options) {
121
- return;
122
- }
123
- /** @inheritdoc */
124
- onExit(criteria, callback, options) {
125
- return;
126
- }
127
- /** @inheritdoc */
128
- onRetain(criteria, callback, options) {
129
- return;
130
- }
131
- /** @inheritdoc */
132
- onEnter(criteria, callback, options) {
133
- return;
134
- }
135
- /** @inheritdoc */
136
- onFinish(criteria, callback, options) {
137
- return;
138
- }
139
- /** @inheritdoc */
140
- onSuccess(criteria, callback, options) {
141
- return;
142
- }
143
- /** @inheritdoc */
144
- onError(criteria, callback, options) {
145
- return;
146
- }
112
+
147
113
  /**
148
114
  * dispose
149
115
  * @internal
150
116
  */
151
- dispose(router) {
117
+ dispose() {
152
118
  Object.values(this._registeredHooks).forEach((hooksArray) =>
153
119
  hooksArray.forEach((hook) => {
154
120
  hook._deregistered = true;
@@ -35,38 +35,7 @@ const stateSelf = prop("self");
35
35
  * It has information about all states being entered and exited as a result of the transition.
36
36
  */
37
37
  export class Transition {
38
- onBefore(criteria, callback, options) {
39
- return;
40
- }
41
- /** @inheritdoc */
42
- onStart(criteria, callback, options) {
43
- return;
44
- }
45
- /** @inheritdoc */
46
- onExit(criteria, callback, options) {
47
- return;
48
- }
49
- /** @inheritdoc */
50
- onRetain(criteria, callback, options) {
51
- return;
52
- }
53
- /** @inheritdoc */
54
- onEnter(criteria, callback, options) {
55
- return;
56
- }
57
- /** @inheritdoc */
58
- onFinish(criteria, callback, options) {
59
- return;
60
- }
61
- /** @inheritdoc */
62
- onSuccess(criteria, callback, options) {
63
- return;
64
- }
65
- /** @inheritdoc */
66
- onError(criteria, callback, options) {
67
- return;
68
- }
69
- /** @internal
38
+ /**
70
39
  * Creates the transition-level hook registration functions
71
40
  * (which can then be used to register hooks)
72
41
  */
@@ -84,8 +84,4 @@ export class UrlRouter {
84
84
  const port = cfgPort === 80 || cfgPort === 443 ? "" : ":" + cfgPort;
85
85
  return [cfg.protocol(), "://", cfg.host(), port, slash, url].join("");
86
86
  }
87
- /** @deprecated use [[UrlService.interceptDeferred]]*/
88
- get interceptDeferred() {
89
- return this.router.urlService.interceptDeferred;
90
- }
91
87
  }
@@ -66,7 +66,6 @@ function getHandlerFn(handler) {
66
66
  */
67
67
  export class UrlRules {
68
68
  constructor(router) {
69
- this.router = router;
70
69
  this._sortFn = defaultRuleSortFn;
71
70
  this._rules = [];
72
71
  this._id = 0;
@@ -16,17 +16,21 @@ export class UrlService {
16
16
  * @type {import('../router').UIRouter}
17
17
  */
18
18
  this.router = router;
19
+
20
+ /** @type {boolean} */
19
21
  this.interceptDeferred = false;
20
22
  /**
21
23
  * The nested [[UrlRules]] API for managing URL rules and rewrites
22
24
  *
23
25
  * See: [[UrlRules]] for details
26
+ * @type {UrlRules}
24
27
  */
25
28
  this.rules = new UrlRules(this.router);
26
29
  /**
27
30
  * The nested [[UrlConfig]] API to configure the URL and retrieve URL information
28
31
  *
29
32
  * See: [[UrlConfig]] for details
33
+ * @type {UrlConfig}
30
34
  */
31
35
  this.config = new UrlConfig(this.router);
32
36
  // Delegate these calls to the current LocationServices implementation
@@ -29,10 +29,6 @@ export class ViewService {
29
29
  * @param {import('../router').UIRouter} router
30
30
  */
31
31
  constructor(router) {
32
- /**
33
- * @type {import('../router').UIRouter}
34
- */
35
- this.router = router;
36
32
  this._uiViews = [];
37
33
  this._viewConfigs = [];
38
34
  this._viewConfigFactories = {};
@@ -41,7 +37,7 @@ export class ViewService {
41
37
  _rootViewContext: this._rootViewContext.bind(this),
42
38
  _viewConfigFactory: this._viewConfigFactory.bind(this),
43
39
  _registeredUIView: (id) =>
44
- find(this._uiViews, (view) => `${this.router.$id}.${view.id}` === id),
40
+ find(this._uiViews, (view) => `${router.$id}.${view.id}` === id),
45
41
  _registeredUIViews: () => this._uiViews,
46
42
  _activeViewConfigs: () => this._viewConfigs,
47
43
  _onSync: (listener) => {
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * These functions are exported, but are subject to change without notice.
5
5
  *
6
- * @packageDocumentation
7
- * @preferred
8
6
  */
9
7
  import { isDate, isFunction, isRegExp, isString } from "./utils";
10
8
  import { all, any, prop, curry, not } from "./hof";
@@ -1117,7 +1117,7 @@ export function encodeUriQuery(val, pctEncodeSpaces) {
1117
1117
  .replace(/%20/g, pctEncodeSpaces ? "%20" : "+");
1118
1118
  }
1119
1119
 
1120
- export const ngAttrPrefixes = ["ng-", "data-ng-", "ng:", "x-ng-"];
1120
+ export const ngAttrPrefixes = ["ng-", "data-ng-"];
1121
1121
 
1122
1122
  export function getNgAttribute(element, ngAttr) {
1123
1123
  let attr;
@@ -1609,15 +1609,15 @@ describe("angular", () => {
1609
1609
 
1610
1610
  it("should look for ngApp directive using querySelectorAll", () => {
1611
1611
  window.angular.module("ABC", []);
1612
- const appElement = jqLite('<div x-ng-app="ABC"></div>')[0];
1613
- element.querySelector["[x-ng-app]"] = appElement;
1612
+ const appElement = jqLite('<div ng-app="ABC"></div>')[0];
1613
+ element.querySelector["[ng-app]"] = appElement;
1614
1614
  angularInit(element);
1615
1615
  expect(bootstrapSpy).toHaveBeenCalled();
1616
1616
  });
1617
1617
 
1618
1618
  it("should bootstrap anonymously", () => {
1619
- const appElement = jqLite("<div x-ng-app></div>")[0];
1620
- element.querySelector["[x-ng-app]"] = appElement;
1619
+ const appElement = jqLite("<div ng-app></div>")[0];
1620
+ element.querySelector["[ng-app]"] = appElement;
1621
1621
  angularInit(element);
1622
1622
  expect(bootstrapSpy).toHaveBeenCalled();
1623
1623
  });
@@ -422,7 +422,7 @@ describe("$compile", () => {
422
422
  expect(el.data("hasCompiled")).toBe(true);
423
423
  });
424
424
 
425
- it("compiles attribute directives with data:ng-attr prefix", () => {
425
+ it("compiles attribute directives with ng-attr prefix", () => {
426
426
  myModule.directive("myDirective", () => {
427
427
  return {
428
428
  restrict: "EA",
@@ -432,7 +432,7 @@ describe("$compile", () => {
432
432
  };
433
433
  });
434
434
  reloadModules();
435
- var el = $("<div data:ng-attr-my-directive></div>");
435
+ var el = $("<div ng-attr-my-directive></div>");
436
436
  $compile(el);
437
437
  expect(el.data("hasCompiled")).toBe(true);
438
438
  });
@@ -16579,11 +16579,11 @@ describe("$compile", () => {
16579
16579
  expect(element.attr("href")).toBe("test/test");
16580
16580
  });
16581
16581
 
16582
- it("should work if they are prefixed with x- or data- and different prefixes", () => {
16582
+ it("should work if they are prefixed with or data- and different prefixes", () => {
16583
16583
  $rootScope.name = "Misko";
16584
16584
  element = $compile(
16585
- '<span data-ng-attr-test2="{{name}}" x-ng-attr-test3="{{name}}" data-ng:attr-test4="{{name}}" ' +
16586
- 'x_ng-attr-test5="{{name}}" data:ng-attr-test6="{{name}}"></span>',
16585
+ '<span data-ng-attr-test2="{{name}}" ng-attr-test3="{{name}}" data-ng:attr-test4="{{name}}" ' +
16586
+ 'ng-attr-test5="{{name}}" ng-attr-test6="{{name}}"></span>',
16587
16587
  )($rootScope);
16588
16588
  expect(element.attr("test2")).toBeUndefined();
16589
16589
  expect(element.attr("test3")).toBeUndefined();
@@ -16661,7 +16661,7 @@ describe("$compile", () => {
16661
16661
  it("should work if they are prefixed with x- or data-", () => {
16662
16662
  $rootScope.name = "JamieMason";
16663
16663
  element = $compile(
16664
- '<span data-ng-attr-dash-test2="{{name}}" x-ng-attr-dash-test3="{{name}}" data-ng:attr-dash-test4="{{name}}"></span>',
16664
+ '<span data-ng-attr-dash-test2="{{name}}" ng-attr-dash-test3="{{name}}" data-ng:attr-dash-test4="{{name}}"></span>',
16665
16665
  )($rootScope);
16666
16666
  expect(element.attr("dash-test2")).toBeUndefined();
16667
16667
  expect(element.attr("dash-test3")).toBeUndefined();
@@ -16880,7 +16880,7 @@ describe("$compile", () => {
16880
16880
  $rootScope.scale = 1;
16881
16881
  element = $compile(
16882
16882
  '<svg data-ng-attr-view_box="{{dimensions}}">' +
16883
- '<filter x-ng-attr-filter_units="{{number}}">' +
16883
+ '<filter ng-attr-filter_units="{{number}}">' +
16884
16884
  '<feDiffuseLighting data-ng:attr_surface_scale="{{scale}}">' +
16885
16885
  "</feDiffuseLighting>" +
16886
16886
  '<feSpecularLighting x-ng:attr_surface_scale="{{scale}}">' +
@@ -17213,8 +17213,8 @@ describe("$compile", () => {
17213
17213
  "<div>" +
17214
17214
  '<span data-ng-show-start="show"></span>' +
17215
17215
  "<span data-ng-show-end></span>" +
17216
- '<span x-ng-show-start="show"></span>' +
17217
- "<span x-ng-show-end></span>" +
17216
+ '<span ng-show-start="show"></span>' +
17217
+ "<span ng-show-end></span>" +
17218
17218
  "</div>",
17219
17219
  )($rootScope);
17220
17220
  $rootScope.$digest();
@@ -79,8 +79,8 @@ describe("ngOn* event binding", () => {
79
79
  it("should work if they are prefixed with x- or data- and different prefixes", () => {
80
80
  const cb = ($rootScope.cb = jasmine.createSpy("ng-on cb"));
81
81
  const element = $compile(
82
- '<span data-ng-on-test2="cb(2)" x-ng-on-test3="cb(3)" data-ng:on-test4="cb(4)" ' +
83
- 'x_ng-on-test5="cb(5)" data:ng-on-test6="cb(6)"></span>',
82
+ '<span data-ng-on-test2="cb(2)" ng-on-test3="cb(3)" data-ng:on-test4="cb(4)" ' +
83
+ 'ng-on-test5="cb(5)" ng-on-test6="cb(6)"></span>',
84
84
  )($rootScope);
85
85
 
86
86
  element.triggerHandler("test2");
@@ -139,8 +139,8 @@ describe("ngProp*", () => {
139
139
  it("should work if they are prefixed with x- or data- and different prefixes", () => {
140
140
  $rootScope.name = "Misko";
141
141
  const element = $compile(
142
- '<span data-ng-prop-test2="name" x-ng-prop-test3="name" data-ng:prop-test4="name" ' +
143
- 'x_ng-prop-test5="name" data:ng-prop-test6="name"></span>',
142
+ '<span data-ng-prop-test2="name" ng-prop-test3="name" data-ng:prop-test4="name" ' +
143
+ 'ng-prop-test5="name" ng-prop-test6="name"></span>',
144
144
  )($rootScope);
145
145
  expect(element[0].test2).toBe("Misko");
146
146
  expect(element[0].test3).toBe("Misko");
@@ -111,7 +111,7 @@ describe("ngRef", () => {
111
111
  // });
112
112
 
113
113
  // it("should work with x-non-normalized attribute name", () => {
114
- // $compile('<my-component x-ng-ref="myComponent2"></my-component>')(
114
+ // $compile('<my-component ng-ref="myComponent2"></my-component>')(
115
115
  // $rootScope,
116
116
  // );
117
117
  // expect($rootScope.myComponent2).toBe(myComponentController);
@@ -512,6 +512,7 @@ describe("$state", () => {
512
512
  transSuccess = true;
513
513
  });
514
514
  await promise;
515
+ await wait(100);
515
516
  expect(transition.dynamic()).toBeTruthy();
516
517
  expect(transSuccess).toBeTruthy();
517
518
  expect(dynlog).toBe("success;[searchDyn=sd2];");
@@ -533,6 +534,7 @@ describe("$state", () => {
533
534
  destState = result;
534
535
  });
535
536
  await promise;
537
+ await wait(100);
536
538
  expect(promise.transition.dynamic()).toBeTruthy();
537
539
  expect($state.current).toBe(dynamicstate);
538
540
  expect(destState).toBe(dynamicstate);
@@ -544,6 +546,7 @@ describe("$state", () => {
544
546
  it("does not exit nor enter any states when fully dynamic", async () => {
545
547
  const promise = $state.go(dynamicstate, { searchDyn: "sd2" });
546
548
  await promise;
549
+ await wait(100);
547
550
  expect(promise.transition.dynamic()).toBeTruthy();
548
551
  expect(promise.transition.treeChanges().entering.length).toBe(0);
549
552
  expect(promise.transition.treeChanges().exiting.length).toBe(0);
@@ -656,7 +659,7 @@ describe("$state", () => {
656
659
  it("updates $stateParams and $location.search when only dynamic params change (triggered via url)", async () => {
657
660
  $location.search({ search: "s1", searchDyn: "sd2" });
658
661
  $rootScope.$broadcast("$locationChangeSuccess");
659
- await wait(10);
662
+ await wait(100);
660
663
  expect($stateParams.search).toBe("s1");
661
664
  expect($stateParams.searchDyn).toBe("sd2");
662
665
  expect($location.search()).toEqual({
@@ -759,7 +762,7 @@ describe("$state", () => {
759
762
  expect(dynlog).toBe("success;[pathDyn=pd2];");
760
763
 
761
764
  await $state.go(dynamicstate, { pathDyn: "pd3", searchDyn: "sd2" });
762
-
765
+ await wait(100);
763
766
  expect(dynlog).toBe(
764
767
  "success;[pathDyn=pd2];success;[pathDyn=pd3,searchDyn=sd2];",
765
768
  );
@@ -826,6 +829,7 @@ describe("$state", () => {
826
829
  await initStateTo(RS);
827
830
  const promise = $state.go(".", { term: "hello" });
828
831
  await promise;
832
+ await wait(100);
829
833
  let success = false,
830
834
  transition = promise.transition;
831
835
  await transition.promise.then(async () => {
@@ -977,7 +981,7 @@ describe("$state", () => {
977
981
 
978
982
  it("updates the location #fragment", async () => {
979
983
  await $state.transitionTo("home.item", { id: "world", "#": "frag" });
980
-
984
+ await wait(100);
981
985
  expect($location.url()).toBe("/front/world#frag");
982
986
  expect($location.hash()).toBe("frag");
983
987
  });