@angular-wave/angular.ts 0.0.25 → 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/CHANGELOG.md +1 -1
- package/dist/angular-ts.esm.js +1 -1
- package/dist/angular-ts.umd.js +1 -1
- package/index.html +3 -3
- package/legacy/angular.js +6 -6
- package/package.json +1 -1
- package/src/core/compile.md +2 -2
- package/src/directive/cloak.md +2 -2
- package/src/directive/repeat.md +1 -1
- package/src/shared/utils.js +1 -1
- package/test/angular.spec.js +4 -4
- package/test/core/compile.spec.js +9 -9
- package/test/core/on.spec.js +2 -2
- package/test/core/prop.spec.js +2 -2
- package/test/directive/ref.spec.js +1 -1
- package/test/router/state.spec.js +7 -3
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:', '
|
|
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 `
|
|
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"
|
|
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], [
|
|
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**, **
|
|
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],[
|
|
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
package/src/core/compile.md
CHANGED
|
@@ -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 `
|
|
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"
|
|
1197
|
+
- <span ng:bind="a" ng-bind="a" data-ng-bind="a" ng-bind="a">
|
|
1198
1198
|
- ```
|
|
1199
1199
|
*/
|
|
1200
1200
|
```
|
package/src/directive/cloak.md
CHANGED
package/src/directive/repeat.md
CHANGED
|
@@ -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**, **
|
|
281
|
+
- as **data-ng-repeat-start**, **ng-repeat-start** and **ng:repeat-start**).
|
|
282
282
|
-
|
|
283
283
|
- @animations
|
|
284
284
|
- | Animation | Occurs |
|
package/src/shared/utils.js
CHANGED
|
@@ -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-"
|
|
1120
|
+
export const ngAttrPrefixes = ["ng-", "data-ng-"];
|
|
1121
1121
|
|
|
1122
1122
|
export function getNgAttribute(element, ngAttr) {
|
|
1123
1123
|
let attr;
|
package/test/angular.spec.js
CHANGED
|
@@ -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
|
|
1613
|
-
element.querySelector["[
|
|
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
|
|
1620
|
-
element.querySelector["[
|
|
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
|
|
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
|
|
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
|
|
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}}"
|
|
16586
|
-
'
|
|
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}}"
|
|
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
|
|
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
|
|
17217
|
-
"<span
|
|
17216
|
+
'<span ng-show-start="show"></span>' +
|
|
17217
|
+
"<span ng-show-end></span>" +
|
|
17218
17218
|
"</div>",
|
|
17219
17219
|
)($rootScope);
|
|
17220
17220
|
$rootScope.$digest();
|
package/test/core/on.spec.js
CHANGED
|
@@ -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)"
|
|
83
|
-
'
|
|
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");
|
package/test/core/prop.spec.js
CHANGED
|
@@ -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"
|
|
143
|
-
'
|
|
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
|
|
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(
|
|
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
|
});
|