@angular-wave/angular.ts 0.0.10 → 0.0.11
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/README.md +8 -15
- package/dist/angular-ts.esm.js +1 -1
- package/dist/angular-ts.umd.js +1 -1
- package/package.json +1 -1
- package/src/core/compile.js +0 -26
- package/src/exts/messages.md +30 -30
- package/test/ng/compile.spec.js +43 -61
- package/test/ng/directive/init.spec.js +1 -1
package/package.json
CHANGED
package/src/core/compile.js
CHANGED
|
@@ -977,18 +977,6 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
|
977
977
|
};
|
|
978
978
|
const NG_PREFIX_BINDING = /^ng(Attr|Prop|On)([A-Z].*)$/;
|
|
979
979
|
const MULTI_ELEMENT_DIR_RE = /^(.+)Start$/;
|
|
980
|
-
|
|
981
|
-
compile.$$addScopeInfo = debugInfoEnabled
|
|
982
|
-
? ($element, scope, isolated, noTemplate) => {
|
|
983
|
-
const dataName = isolated
|
|
984
|
-
? noTemplate
|
|
985
|
-
? "$isolateScopeNoTemplate"
|
|
986
|
-
: "$isolateScope"
|
|
987
|
-
: "$scope";
|
|
988
|
-
$element.data(dataName, scope);
|
|
989
|
-
}
|
|
990
|
-
: () => {};
|
|
991
|
-
|
|
992
980
|
return compile;
|
|
993
981
|
|
|
994
982
|
//= ===============================
|
|
@@ -1252,7 +1240,6 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
|
1252
1240
|
if (nodeLinkFn) {
|
|
1253
1241
|
if (nodeLinkFn.scope) {
|
|
1254
1242
|
childScope = scope.$new();
|
|
1255
|
-
compile.$$addScopeInfo(jqLite(node), childScope);
|
|
1256
1243
|
} else {
|
|
1257
1244
|
childScope = scope;
|
|
1258
1245
|
}
|
|
@@ -2118,19 +2105,6 @@ export function $CompileProvider($provide, $$sanitizeUriProvider) {
|
|
|
2118
2105
|
}
|
|
2119
2106
|
|
|
2120
2107
|
if (newIsolateScopeDirective) {
|
|
2121
|
-
// Initialize isolate scope bindings for new isolate scope directive.
|
|
2122
|
-
compile.$$addScopeInfo(
|
|
2123
|
-
$element,
|
|
2124
|
-
isolateScope,
|
|
2125
|
-
true,
|
|
2126
|
-
!(
|
|
2127
|
-
templateDirective &&
|
|
2128
|
-
(templateDirective === newIsolateScopeDirective ||
|
|
2129
|
-
templateDirective ===
|
|
2130
|
-
newIsolateScopeDirective.$$originalDirective)
|
|
2131
|
-
),
|
|
2132
|
-
);
|
|
2133
|
-
|
|
2134
2108
|
isolateScope.$$isolateBindings =
|
|
2135
2109
|
newIsolateScopeDirective.$$isolateBindings;
|
|
2136
2110
|
scopeBindingInfo = initializeDirectiveBindings(
|
package/src/exts/messages.md
CHANGED
|
@@ -518,33 +518,33 @@ _ {@link module:ngMessages Click here} to learn more about`ngMessages`and`ngMess
|
|
|
518
518
|
_ @param {string} ngMessageExp|whenExp an expression value corresponding to the message key.
|
|
519
519
|
_/
|
|
520
520
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
521
|
+
/**
|
|
522
|
+
* @ngdoc directive
|
|
523
|
+
* @name ngMessageDefault
|
|
524
|
+
* @restrict AE
|
|
525
|
+
* @scope
|
|
526
|
+
*
|
|
527
|
+
* @description
|
|
528
|
+
* `ngMessageDefault` is a directive with the purpose to show and hide a default message for
|
|
529
|
+
* {@link directive:ngMessages}, when none of provided messages matches.
|
|
530
|
+
*
|
|
531
|
+
* More information about using `ngMessageDefault` can be found in the
|
|
532
|
+
* {@link module:ngMessages `ngMessages` module documentation}.
|
|
533
|
+
*
|
|
534
|
+
* @usage
|
|
535
|
+
* ```html
|
|
536
|
+
* <!-- using attribute directives -->
|
|
537
|
+
* <ANY ng-messages="expression" role="alert">
|
|
538
|
+
* <ANY ng-message="stringValue">...</ANY>
|
|
539
|
+
* <ANY ng-message="stringValue1, stringValue2, ...">...</ANY>
|
|
540
|
+
* <ANY ng-message-default>...</ANY>
|
|
541
|
+
* </ANY>
|
|
542
|
+
*
|
|
543
|
+
* <!-- or by using element directives -->
|
|
544
|
+
* <ng-messages for="expression" role="alert">
|
|
545
|
+
* <ng-message when="stringValue">...</ng-message>
|
|
546
|
+
* <ng-message when="stringValue1, stringValue2, ...">...</ng-message>
|
|
547
|
+
* <ng-message-default>...</ng-message-default>
|
|
548
|
+
* </ng-messages>
|
|
549
|
+
*
|
|
550
|
+
*/
|
package/test/ng/compile.spec.js
CHANGED
|
@@ -1342,7 +1342,7 @@ describe("$compile", () => {
|
|
|
1342
1342
|
expect(givenScope.$parent).toBe($rootScope);
|
|
1343
1343
|
});
|
|
1344
1344
|
|
|
1345
|
-
it("adds
|
|
1345
|
+
it("adds new scope", () => {
|
|
1346
1346
|
var givenScope;
|
|
1347
1347
|
registerDirectives("myDirective", () => {
|
|
1348
1348
|
return {
|
|
@@ -1355,7 +1355,7 @@ describe("$compile", () => {
|
|
|
1355
1355
|
reloadModules();
|
|
1356
1356
|
var el = $("<div my-directive></div>");
|
|
1357
1357
|
$compile(el)($rootScope);
|
|
1358
|
-
expect(
|
|
1358
|
+
expect($rootScope.$$childHead).toBe(givenScope);
|
|
1359
1359
|
});
|
|
1360
1360
|
|
|
1361
1361
|
it("creates an isolate scope when requested", () => {
|
|
@@ -1459,7 +1459,7 @@ describe("$compile", () => {
|
|
|
1459
1459
|
}).toThrowError();
|
|
1460
1460
|
});
|
|
1461
1461
|
|
|
1462
|
-
it("adds
|
|
1462
|
+
it("adds isolated scope", () => {
|
|
1463
1463
|
var givenScope;
|
|
1464
1464
|
registerDirectives("myDirective", () => {
|
|
1465
1465
|
return {
|
|
@@ -1472,7 +1472,7 @@ describe("$compile", () => {
|
|
|
1472
1472
|
reloadModules();
|
|
1473
1473
|
var el = $("<div my-directive></div>");
|
|
1474
1474
|
$compile(el)($rootScope);
|
|
1475
|
-
expect(
|
|
1475
|
+
expect($rootScope.$$childHead).toBe(givenScope);
|
|
1476
1476
|
});
|
|
1477
1477
|
|
|
1478
1478
|
it("allows observing attribute to the isolate scope", () => {
|
|
@@ -6830,7 +6830,6 @@ describe("$compile", () => {
|
|
|
6830
6830
|
return {
|
|
6831
6831
|
pre(scope, element) {
|
|
6832
6832
|
log.push(scope.$id);
|
|
6833
|
-
expect(element.data("$scope")).toBe(scope);
|
|
6834
6833
|
},
|
|
6835
6834
|
};
|
|
6836
6835
|
},
|
|
@@ -6842,7 +6841,6 @@ describe("$compile", () => {
|
|
|
6842
6841
|
return function (scope, element) {
|
|
6843
6842
|
iscope = scope;
|
|
6844
6843
|
log.push(scope.$id);
|
|
6845
|
-
expect(element.data("$isolateScopeNoTemplate")).toBe(scope);
|
|
6846
6844
|
};
|
|
6847
6845
|
},
|
|
6848
6846
|
}));
|
|
@@ -6853,7 +6851,6 @@ describe("$compile", () => {
|
|
|
6853
6851
|
compile() {
|
|
6854
6852
|
return function (scope, element) {
|
|
6855
6853
|
log.push(scope.$id);
|
|
6856
|
-
expect(element.data("$scope")).toBe(scope);
|
|
6857
6854
|
};
|
|
6858
6855
|
},
|
|
6859
6856
|
}));
|
|
@@ -6864,7 +6861,6 @@ describe("$compile", () => {
|
|
|
6864
6861
|
compile() {
|
|
6865
6862
|
return function (scope, element) {
|
|
6866
6863
|
log.push(scope.$id);
|
|
6867
|
-
expect(element.data("$scope")).toBe(scope);
|
|
6868
6864
|
};
|
|
6869
6865
|
},
|
|
6870
6866
|
}));
|
|
@@ -6876,7 +6872,6 @@ describe("$compile", () => {
|
|
|
6876
6872
|
compile() {
|
|
6877
6873
|
return function (scope, element) {
|
|
6878
6874
|
log.push(scope.$id);
|
|
6879
|
-
expect(element.data("$scope")).toBe(scope);
|
|
6880
6875
|
};
|
|
6881
6876
|
},
|
|
6882
6877
|
}));
|
|
@@ -6888,7 +6883,6 @@ describe("$compile", () => {
|
|
|
6888
6883
|
return function (scope, element) {
|
|
6889
6884
|
iscope = scope;
|
|
6890
6885
|
log.push(scope.$id);
|
|
6891
|
-
expect(element.data("$isolateScope")).toBe(scope);
|
|
6892
6886
|
};
|
|
6893
6887
|
},
|
|
6894
6888
|
}));
|
|
@@ -6900,7 +6894,6 @@ describe("$compile", () => {
|
|
|
6900
6894
|
return function (scope, element) {
|
|
6901
6895
|
iscope = scope;
|
|
6902
6896
|
log.push(scope.$id);
|
|
6903
|
-
expect(element.data("$isolateScope")).toBe(scope);
|
|
6904
6897
|
};
|
|
6905
6898
|
},
|
|
6906
6899
|
}));
|
|
@@ -6993,7 +6986,6 @@ describe("$compile", () => {
|
|
|
6993
6986
|
$rootScope.name = "Jozo";
|
|
6994
6987
|
$rootScope.$apply();
|
|
6995
6988
|
expect(element.text().match(/Jozo/)).toBeTruthy();
|
|
6996
|
-
expect(element.find("span").scope().$id).toBeDefined();
|
|
6997
6989
|
});
|
|
6998
6990
|
|
|
6999
6991
|
it("should allow creation of new scopes for replace directives with templates", () => {
|
|
@@ -7007,7 +6999,6 @@ describe("$compile", () => {
|
|
|
7007
6999
|
$rootScope.name = "Jozo";
|
|
7008
7000
|
$rootScope.$apply();
|
|
7009
7001
|
expect(element.text().match(/Jozo/)).toBeTruthy();
|
|
7010
|
-
expect(element.find("a").scope().$id).toBeDefined();
|
|
7011
7002
|
});
|
|
7012
7003
|
|
|
7013
7004
|
it("should allow creation of new scopes for replace directives with templates in a repeater", () => {
|
|
@@ -7020,8 +7011,6 @@ describe("$compile", () => {
|
|
|
7020
7011
|
$rootScope.name = "Jozo";
|
|
7021
7012
|
$rootScope.$apply();
|
|
7022
7013
|
expect(element.text()).toBe("Jozo|Jozo|Jozo|");
|
|
7023
|
-
expect(element.find("p").scope().$id).toBeDefined();
|
|
7024
|
-
expect(element.find("a").scope().$id).toBeDefined();
|
|
7025
7014
|
});
|
|
7026
7015
|
|
|
7027
7016
|
it("should allow creation of new isolated scopes for directives with templates", () => {
|
|
@@ -7081,24 +7070,24 @@ describe("$compile", () => {
|
|
|
7081
7070
|
describe("with new scope directives", () => {
|
|
7082
7071
|
it("should return the new scope at the directive element", () => {
|
|
7083
7072
|
element = $compile("<div scope></div>")($rootScope);
|
|
7084
|
-
expect(
|
|
7073
|
+
expect($rootScope.$$childHead.$parent).toBe($rootScope);
|
|
7085
7074
|
});
|
|
7086
7075
|
|
|
7087
7076
|
it("should return the new scope for children in the original template", () => {
|
|
7088
7077
|
element = $compile("<div scope><a></a></div>")($rootScope);
|
|
7089
|
-
expect(
|
|
7078
|
+
expect($rootScope.$$childHead.$parent).toBe($rootScope);
|
|
7090
7079
|
});
|
|
7091
7080
|
|
|
7092
7081
|
it("should return the new scope for children in the directive template", () => {
|
|
7093
7082
|
$templateCache.put("tscope.html", "<a></a>");
|
|
7094
7083
|
element = $compile("<div tscope></div>")($rootScope);
|
|
7095
7084
|
$rootScope.$digest();
|
|
7096
|
-
expect(
|
|
7085
|
+
expect($rootScope.$$childHead.$parent).toBe($rootScope);
|
|
7097
7086
|
});
|
|
7098
7087
|
|
|
7099
7088
|
it("should return the new scope for children in the directive sync template", () => {
|
|
7100
7089
|
element = $compile("<div stscope></div>")($rootScope);
|
|
7101
|
-
expect(
|
|
7090
|
+
expect($rootScope.$$childHead.$parent).toBe($rootScope);
|
|
7102
7091
|
});
|
|
7103
7092
|
});
|
|
7104
7093
|
|
|
@@ -7119,16 +7108,14 @@ describe("$compile", () => {
|
|
|
7119
7108
|
it("should return the isolate scope for children in directive template", () => {
|
|
7120
7109
|
$templateCache.put("tiscope.html", "<a></a>");
|
|
7121
7110
|
element = $compile("<div tiscope></div>")($rootScope);
|
|
7122
|
-
expect(
|
|
7111
|
+
expect($rootScope.$$childHead).toBeDefined(); // ??? this is the current behavior, not desired feature
|
|
7123
7112
|
$rootScope.$digest();
|
|
7124
|
-
expect(
|
|
7125
|
-
expect(element.isolateScope()).not.toBe($rootScope);
|
|
7113
|
+
expect($rootScope.$$childHead).not.toBe($rootScope);
|
|
7126
7114
|
});
|
|
7127
7115
|
|
|
7128
7116
|
it("should return the isolate scope for children in directive sync template", () => {
|
|
7129
7117
|
element = $compile("<div stiscope></div>")($rootScope);
|
|
7130
|
-
expect(
|
|
7131
|
-
expect(element.isolateScope()).not.toBe($rootScope);
|
|
7118
|
+
expect($rootScope.$$childHead).not.toBe($rootScope);
|
|
7132
7119
|
});
|
|
7133
7120
|
|
|
7134
7121
|
it('should handle "=" bindings with same method names in Object.prototype correctly when not present', () => {
|
|
@@ -7139,8 +7126,7 @@ describe("$compile", () => {
|
|
|
7139
7126
|
};
|
|
7140
7127
|
|
|
7141
7128
|
expect(func).not.toThrow();
|
|
7142
|
-
const scope =
|
|
7143
|
-
expect(element.find("span").scope()).toBe(scope);
|
|
7129
|
+
const scope = $rootScope.$$childHead;
|
|
7144
7130
|
expect(scope).not.toBe($rootScope);
|
|
7145
7131
|
|
|
7146
7132
|
// Not shadowed because optional
|
|
@@ -7162,8 +7148,7 @@ describe("$compile", () => {
|
|
|
7162
7148
|
};
|
|
7163
7149
|
|
|
7164
7150
|
expect(func).not.toThrow();
|
|
7165
|
-
const scope =
|
|
7166
|
-
expect(element.find("span").scope()).toBe(scope);
|
|
7151
|
+
const scope = $rootScope.$$childHead;
|
|
7167
7152
|
expect(scope).not.toBe($rootScope);
|
|
7168
7153
|
expect(scope.constructor).toBe("constructor");
|
|
7169
7154
|
expect(scope.hasOwnProperty("constructor")).toBe(true);
|
|
@@ -7333,8 +7318,7 @@ describe("$compile", () => {
|
|
|
7333
7318
|
};
|
|
7334
7319
|
|
|
7335
7320
|
expect(func).not.toThrow();
|
|
7336
|
-
const scope =
|
|
7337
|
-
expect(element.find("span").scope()).toBe(scope);
|
|
7321
|
+
const scope = $rootScope.$$childHead;
|
|
7338
7322
|
expect(scope).not.toBe($rootScope);
|
|
7339
7323
|
|
|
7340
7324
|
// Does not shadow value because optional
|
|
@@ -7354,10 +7338,10 @@ describe("$compile", () => {
|
|
|
7354
7338
|
};
|
|
7355
7339
|
|
|
7356
7340
|
expect(func).not.toThrow();
|
|
7357
|
-
|
|
7358
|
-
expect(
|
|
7359
|
-
expect(
|
|
7360
|
-
expect(
|
|
7341
|
+
const scope = $rootScope.$$childHead;
|
|
7342
|
+
expect(scope).not.toBe($rootScope);
|
|
7343
|
+
expect(scope.constructor).toBe("constructor");
|
|
7344
|
+
expect(scope.valueOf).toBe("valueOf");
|
|
7361
7345
|
});
|
|
7362
7346
|
|
|
7363
7347
|
it('should handle "&" bindings with same method names in Object.prototype correctly when not present', () => {
|
|
@@ -7368,12 +7352,10 @@ describe("$compile", () => {
|
|
|
7368
7352
|
};
|
|
7369
7353
|
|
|
7370
7354
|
expect(func).not.toThrow();
|
|
7371
|
-
|
|
7372
|
-
expect(
|
|
7373
|
-
expect(
|
|
7374
|
-
|
|
7375
|
-
);
|
|
7376
|
-
expect(element.isolateScope().valueOf()).toBeUndefined();
|
|
7355
|
+
const scope = $rootScope.$$childHead;
|
|
7356
|
+
expect(scope).not.toBe($rootScope);
|
|
7357
|
+
expect(scope.constructor).toBe($rootScope.constructor);
|
|
7358
|
+
expect(scope.valueOf()).toBeUndefined();
|
|
7377
7359
|
});
|
|
7378
7360
|
|
|
7379
7361
|
it('should handle "&" bindings with same method names in Object.prototype correctly when present', () => {
|
|
@@ -7390,10 +7372,10 @@ describe("$compile", () => {
|
|
|
7390
7372
|
};
|
|
7391
7373
|
|
|
7392
7374
|
expect(func).not.toThrow();
|
|
7393
|
-
|
|
7394
|
-
expect(
|
|
7395
|
-
expect(
|
|
7396
|
-
expect(
|
|
7375
|
+
const scope = $rootScope.$$childHead;
|
|
7376
|
+
expect(scope).not.toBe($rootScope);
|
|
7377
|
+
expect(scope.constructor()).toBe("constructor");
|
|
7378
|
+
expect(scope.valueOf()).toBe("valueOf");
|
|
7397
7379
|
});
|
|
7398
7380
|
|
|
7399
7381
|
it("should handle @ bindings on BOOLEAN attributes", () => {
|
|
@@ -8883,7 +8865,7 @@ describe("$compile", () => {
|
|
|
8883
8865
|
}),
|
|
8884
8866
|
});
|
|
8885
8867
|
|
|
8886
|
-
|
|
8868
|
+
$rootScope.$$childHead.$ctrl.prop1 = 2;
|
|
8887
8869
|
$rootScope.$apply("val = 2");
|
|
8888
8870
|
expect(log.pop()).toEqual({
|
|
8889
8871
|
prop1: jasmine.objectContaining({
|
|
@@ -9647,7 +9629,7 @@ describe("$compile", () => {
|
|
|
9647
9629
|
element = $compile('<div my-component reference="num"></div>')(
|
|
9648
9630
|
$rootScope,
|
|
9649
9631
|
);
|
|
9650
|
-
const isolateScope =
|
|
9632
|
+
const isolateScope = $rootScope.$$childHead;
|
|
9651
9633
|
expect(isolateScope.reference).toBeNaN();
|
|
9652
9634
|
|
|
9653
9635
|
isolateScope.$apply((scope) => {
|
|
@@ -9661,7 +9643,7 @@ describe("$compile", () => {
|
|
|
9661
9643
|
element = $compile('<div my-component reference="num"></div>')(
|
|
9662
9644
|
$rootScope,
|
|
9663
9645
|
);
|
|
9664
|
-
const isolateScope =
|
|
9646
|
+
const isolateScope = $rootScope.$$childHead;
|
|
9665
9647
|
expect(isolateScope.reference).toBeNaN();
|
|
9666
9648
|
|
|
9667
9649
|
$rootScope.$apply((scope) => {
|
|
@@ -9697,7 +9679,7 @@ describe("$compile", () => {
|
|
|
9697
9679
|
'to-string="value = !value"></div>',
|
|
9698
9680
|
)($rootScope);
|
|
9699
9681
|
}).not.toThrow();
|
|
9700
|
-
const isolateScope =
|
|
9682
|
+
const isolateScope = $rootScope.$$childHead;
|
|
9701
9683
|
|
|
9702
9684
|
expect(typeof isolateScope.constructor).toBe("string");
|
|
9703
9685
|
expect(isArray(isolateScope.watch)).toBe(true);
|
|
@@ -9730,13 +9712,13 @@ describe("$compile", () => {
|
|
|
9730
9712
|
|
|
9731
9713
|
it("should not initialize scope value if optional expression binding is not passed", () => {
|
|
9732
9714
|
element = $compile("<div my-component></div>")($rootScope);
|
|
9733
|
-
const isolateScope =
|
|
9715
|
+
const isolateScope = $rootScope.$$childHead;
|
|
9734
9716
|
expect(isolateScope.optExpr).toBeUndefined();
|
|
9735
9717
|
});
|
|
9736
9718
|
|
|
9737
9719
|
it("should not initialize scope value if optional expression binding with Object.prototype name is not passed", () => {
|
|
9738
9720
|
element = $compile("<div my-component></div>")($rootScope);
|
|
9739
|
-
const isolateScope =
|
|
9721
|
+
const isolateScope = $rootScope.$$childHead;
|
|
9740
9722
|
expect(isolateScope.constructor).toBe($rootScope.constructor);
|
|
9741
9723
|
});
|
|
9742
9724
|
|
|
@@ -9744,7 +9726,7 @@ describe("$compile", () => {
|
|
|
9744
9726
|
element = $compile(
|
|
9745
9727
|
"<div my-component opt-expr=\"value = 'did!'\"></div>",
|
|
9746
9728
|
)($rootScope);
|
|
9747
|
-
const isolateScope =
|
|
9729
|
+
const isolateScope = $rootScope.$$childHead;
|
|
9748
9730
|
expect(typeof isolateScope.optExpr).toBe("function");
|
|
9749
9731
|
expect(isolateScope.optExpr()).toBe("did!");
|
|
9750
9732
|
expect($rootScope.value).toBe("did!");
|
|
@@ -9754,7 +9736,7 @@ describe("$compile", () => {
|
|
|
9754
9736
|
element = $compile(
|
|
9755
9737
|
"<div my-component constructor=\"value = 'did!'\"></div>",
|
|
9756
9738
|
)($rootScope);
|
|
9757
|
-
const isolateScope =
|
|
9739
|
+
const isolateScope = $rootScope.$$childHead;
|
|
9758
9740
|
expect(typeof isolateScope.constructor).toBe("function");
|
|
9759
9741
|
expect(isolateScope.constructor()).toBe("did!");
|
|
9760
9742
|
expect($rootScope.value).toBe("did!");
|
|
@@ -9782,7 +9764,7 @@ describe("$compile", () => {
|
|
|
9782
9764
|
});
|
|
9783
9765
|
|
|
9784
9766
|
element = $compile("<div test-dir></div>")($rootScope);
|
|
9785
|
-
const scope =
|
|
9767
|
+
const scope = $rootScope.$$childHead;
|
|
9786
9768
|
expect(scope.ctrl.getProp()).toBe("default");
|
|
9787
9769
|
|
|
9788
9770
|
$rootScope.$digest();
|
|
@@ -9811,7 +9793,7 @@ describe("$compile", () => {
|
|
|
9811
9793
|
});
|
|
9812
9794
|
|
|
9813
9795
|
element = $compile("<div test-dir></div>")($rootScope);
|
|
9814
|
-
const scope =
|
|
9796
|
+
const scope = $rootScope.$$childHead;
|
|
9815
9797
|
expect(scope.ctrl.getProp()).toBe("default");
|
|
9816
9798
|
$rootScope.$digest();
|
|
9817
9799
|
expect(scope.ctrl.getProp()).toBe("default");
|
|
@@ -10687,7 +10669,7 @@ describe("$compile", () => {
|
|
|
10687
10669
|
$rootScope,
|
|
10688
10670
|
);
|
|
10689
10671
|
|
|
10690
|
-
const isolateScope =
|
|
10672
|
+
const isolateScope = $rootScope.$$childHead;
|
|
10691
10673
|
expect(isolateScope.owRef).toBeNaN();
|
|
10692
10674
|
|
|
10693
10675
|
$rootScope.num = 64;
|
|
@@ -11868,7 +11850,7 @@ describe("$compile", () => {
|
|
|
11868
11850
|
element = $compile("<div foo-dir>")($rootScope);
|
|
11869
11851
|
$rootScope.$digest();
|
|
11870
11852
|
expect(controllerCalled).toBe(true);
|
|
11871
|
-
const childScope =
|
|
11853
|
+
const childScope = $rootScope.$$childHead;
|
|
11872
11854
|
expect(childScope).not.toBe($rootScope);
|
|
11873
11855
|
expect(childScope.theCtrl).toBe(myCtrl);
|
|
11874
11856
|
});
|
|
@@ -11926,7 +11908,7 @@ describe("$compile", () => {
|
|
|
11926
11908
|
)($rootScope);
|
|
11927
11909
|
$rootScope.$digest();
|
|
11928
11910
|
expect(controllerCalled).toBe(true);
|
|
11929
|
-
const childScope =
|
|
11911
|
+
const childScope = $rootScope.$$childHead;
|
|
11930
11912
|
expect(childScope).not.toBe($rootScope);
|
|
11931
11913
|
expect(childScope.theCtrl).not.toBe(myCtrl);
|
|
11932
11914
|
expect(childScope.theCtrl.constructor).toBe(MyCtrl);
|
|
@@ -11986,7 +11968,7 @@ describe("$compile", () => {
|
|
|
11986
11968
|
)($rootScope);
|
|
11987
11969
|
$rootScope.$digest();
|
|
11988
11970
|
expect(controllerCalled).toBe(true);
|
|
11989
|
-
const childScope =
|
|
11971
|
+
const childScope = $rootScope.$$childHead;
|
|
11990
11972
|
expect(childScope).not.toBe($rootScope);
|
|
11991
11973
|
expect(childScope.theCtrl).not.toBe(myCtrl);
|
|
11992
11974
|
expect(childScope.theCtrl.constructor).toBe(MyCtrl);
|
|
@@ -12017,7 +11999,7 @@ describe("$compile", () => {
|
|
|
12017
11999
|
);
|
|
12018
12000
|
initInjector("test1");
|
|
12019
12001
|
element = $compile("<div test-dir></div>")($rootScope);
|
|
12020
|
-
const scope =
|
|
12002
|
+
const scope = $rootScope.$$childHead;
|
|
12021
12003
|
expect(scope.ctrl.getProp()).toBe("default");
|
|
12022
12004
|
|
|
12023
12005
|
$rootScope.$digest();
|
|
@@ -12047,7 +12029,7 @@ describe("$compile", () => {
|
|
|
12047
12029
|
);
|
|
12048
12030
|
initInjector("test1");
|
|
12049
12031
|
element = $compile("<div test-dir></div>")($rootScope);
|
|
12050
|
-
const scope =
|
|
12032
|
+
const scope = $rootScope.$$childHead;
|
|
12051
12033
|
expect(scope.ctrl.getProp()).toBe("default");
|
|
12052
12034
|
|
|
12053
12035
|
$rootScope.$digest();
|
|
@@ -12638,7 +12620,7 @@ describe("$compile", () => {
|
|
|
12638
12620
|
|
|
12639
12621
|
element = element.children().eq(0);
|
|
12640
12622
|
expect(element[0].checked).toBe(false);
|
|
12641
|
-
|
|
12623
|
+
$rootScope.$$childHead.model = true;
|
|
12642
12624
|
$rootScope.$digest();
|
|
12643
12625
|
expect(element[0].checked).toBe(true);
|
|
12644
12626
|
});
|