@angular-wave/angular.ts 0.0.7 → 0.0.9
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/dist/angular-ts.esm.js +1 -1
- package/dist/angular-ts.umd.js +1 -1
- package/docs/.cspell.yml +8 -0
- package/docs/.github/dependabot.yml +14 -0
- package/docs/.nvmrc +1 -0
- package/docs/CONTRIBUTING.md +28 -0
- package/docs/Dockerfile +4 -0
- package/docs/LICENSE +201 -0
- package/docs/README.md +184 -0
- package/docs/assets/scss/_variables_project.scss +6 -0
- package/docs/config.yaml +15 -0
- package/docs/content/en/_index.md +77 -0
- package/docs/content/en/about/featured-background.jpg +0 -0
- package/docs/content/en/about/index.md +35 -0
- package/docs/content/en/blog/_index.md +8 -0
- package/docs/content/en/blog/news/_index.md +4 -0
- package/docs/content/en/blog/news/first-post/featured-sunset-get.png +0 -0
- package/docs/content/en/blog/news/first-post/index.md +48 -0
- package/docs/content/en/blog/news/second-post.md +244 -0
- package/docs/content/en/blog/releases/_index.md +4 -0
- package/docs/content/en/blog/releases/in-depth-monoliths-detailed-spec.md +244 -0
- package/docs/content/en/community/_index.md +6 -0
- package/docs/content/en/docs/_index.md +29 -0
- package/docs/content/en/docs/concepts/_index.md +14 -0
- package/docs/content/en/docs/contribution-guidelines/_index.md +79 -0
- package/docs/content/en/docs/examples/_index.md +13 -0
- package/docs/content/en/docs/getting-started/_index.md +35 -0
- package/docs/content/en/docs/getting-started/example-page.md +240 -0
- package/docs/content/en/docs/overview/_index.md +36 -0
- package/docs/content/en/docs/reference/_index.md +12 -0
- package/docs/content/en/docs/reference/parameter-reference.md +211 -0
- package/docs/content/en/docs/tasks/Ponycopters/_index.md +12 -0
- package/docs/content/en/docs/tasks/Ponycopters/configuring-ponycopters.md +238 -0
- package/docs/content/en/docs/tasks/Ponycopters/launching-ponycopters.md +236 -0
- package/docs/content/en/docs/tasks/_index.md +21 -0
- package/docs/content/en/docs/tasks/beds.md +237 -0
- package/docs/content/en/docs/tasks/porridge.md +237 -0
- package/docs/content/en/docs/tasks/task.md +237 -0
- package/docs/content/en/docs/tutorials/_index.md +13 -0
- package/docs/content/en/docs/tutorials/multi-bear.md +236 -0
- package/docs/content/en/docs/tutorials/tutorial2.md +236 -0
- package/docs/content/en/featured-background.jpg +0 -0
- package/docs/content/en/search.md +4 -0
- package/docs/docker-compose.yaml +13 -0
- package/docs/docsy.work +5 -0
- package/docs/docsy.work.sum +0 -0
- package/docs/go.mod +5 -0
- package/docs/go.sum +6 -0
- package/docs/hugo-disabled.toml +221 -0
- package/docs/hugo.yaml +220 -0
- package/docs/layouts/404.html +7 -0
- package/docs/layouts/_default/_markup/render-heading.html +1 -0
- package/docs/netlify.toml +12 -0
- package/docs/package.json +42 -0
- package/package.json +1 -1
- package/rollup.config.js +2 -5
- package/src/core/compile.js +82 -269
- package/src/core/compile.md +51 -16
- package/src/core/filter.md +23 -17
- package/src/core/interval.md +73 -72
- package/src/core/sce.js +2 -13
- package/src/directive/if.js +2 -7
- package/src/directive/repeat.js +5 -346
- package/src/directive/repeat.md +358 -0
- package/src/directive/switch.js +2 -4
- package/src/exts/messages.js +2 -494
- package/src/exts/messages.md +550 -0
- package/src/injector.md +30 -1
- package/src/jqLite.js +11 -17
- package/src/loader.js +0 -4
- package/test/binding.spec.js +24 -24
- package/test/jqlite.spec.js +0 -56
- package/test/messages/messages.spec.js +3 -5
- package/test/module-test.html +5 -1
- package/test/ng/compile.spec.js +94 -371
- package/test/ng/directive/form.spec.js +8 -8
- package/test/ng/directive/repeat.spec.js +0 -37
- package/test/ng/directive/switch.spec.js +2 -9
- package/types/jqlite.d.ts +0 -78
- package/dist/angular-ts.cjs.js +0 -1
package/src/core/compile.md
CHANGED
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
-
|
|
122
122
|
- ### Life-cycle hooks
|
|
123
123
|
- Directive controllers can provide the following methods that are called by AngularJS at points in the life-cycle of the
|
|
124
|
-
- directive:
|
|
124
|
+
- directive.The following hooks can be defined on the controller prototype or added to the controller inside its constructor:
|
|
125
125
|
- - `$onInit()` - Called on each controller after all the controllers on an element have been constructed and
|
|
126
126
|
- had their bindings initialized (and before the pre & post linking functions for the directives on
|
|
127
127
|
- this element). This is a good place to put initialization code for your controller.
|
|
@@ -136,6 +136,8 @@
|
|
|
136
136
|
- could be useful if you wish to perform a deep equality check, or to check a Date object, changes to which would not
|
|
137
137
|
- be detected by AngularJS's change detector and thus not trigger `$onChanges`. This hook is invoked with no arguments;
|
|
138
138
|
- if detecting changes, you must store the previous value(s) for comparison to the current values.
|
|
139
|
+
- Changes to the model inside `$doCheck` will trigger new turns of the digest loop, which will cause the changes to be
|
|
140
|
+
- propagated throughout the application.
|
|
139
141
|
- - `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing
|
|
140
142
|
- external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in
|
|
141
143
|
- the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent
|
|
@@ -145,21 +147,7 @@
|
|
|
145
147
|
- Note that child elements that contain `templateUrl` directives will not have been compiled and linked since
|
|
146
148
|
- they are waiting for their template to load asynchronously and their own compilation and linking has been
|
|
147
149
|
- suspended until that occurs.
|
|
148
|
-
|
|
149
|
-
- #### Comparison with life-cycle hooks in the new Angular
|
|
150
|
-
- The new Angular also uses life-cycle hooks for its components. While the AngularJS life-cycle hooks are similar there are
|
|
151
|
-
- some differences that you should be aware of, especially when it comes to moving your code from AngularJS to Angular:
|
|
152
|
-
-
|
|
153
|
-
- - AngularJS hooks are prefixed with `$`, such as `$onInit`. Angular hooks are prefixed with `ng`, such as `ngOnInit`.
|
|
154
|
-
- - AngularJS hooks can be defined on the controller prototype or added to the controller inside its constructor.
|
|
155
|
-
- In Angular you can only define hooks on the prototype of the Component class.
|
|
156
|
-
- - Due to the differences in change-detection, you may get many more calls to `$doCheck` in AngularJS than you would to
|
|
157
|
-
- `ngDoCheck` in Angular.
|
|
158
|
-
- - Changes to the model inside `$doCheck` will trigger new turns of the digest loop, which will cause the changes to be
|
|
159
|
-
- propagated throughout the application.
|
|
160
|
-
- Angular does not allow the `ngDoCheck` hook to trigger a change outside of the component. It will either throw an
|
|
161
|
-
- error or do nothing depending upon the state of `enableProdMode()`.
|
|
162
|
-
-
|
|
150
|
+
|
|
163
151
|
- #### Life-cycle hook examples
|
|
164
152
|
-
|
|
165
153
|
- This example shows how you can check for mutations to a Date object even though the identity of the object
|
|
@@ -1016,6 +1004,7 @@
|
|
|
1016
1004
|
- Result: <span ng-class="{'something': something} {'else': else}" ng-show="!condition otherCondition"></span>
|
|
1017
1005
|
- ```
|
|
1018
1006
|
|
|
1007
|
+
``
|
|
1019
1008
|
```
|
|
1020
1009
|
|
|
1021
1010
|
-
|
|
@@ -1190,3 +1179,49 @@
|
|
|
1190
1179
|
- `myEvent` must be written as `ng-on-my_event="expression"`.
|
|
1191
1180
|
-
|
|
1192
1181
|
- \*/
|
|
1182
|
+
|
|
1183
|
+
/\*\*
|
|
1184
|
+
|
|
1185
|
+
- @ngdoc type
|
|
1186
|
+
- @name $compile.directive.Attributes
|
|
1187
|
+
-
|
|
1188
|
+
- @description
|
|
1189
|
+
- A shared object between directive compile / linking functions which contains normalized DOM
|
|
1190
|
+
- element attributes. The values reflect current binding state `{{ }}`. The normalization is
|
|
1191
|
+
- needed since all of these are treated as equivalent in AngularJS:
|
|
1192
|
+
-
|
|
1193
|
+
- ```
|
|
1194
|
+
|
|
1195
|
+
```
|
|
1196
|
+
|
|
1197
|
+
- <span ng:bind="a" ng-bind="a" data-ng-bind="a" x-ng-bind="a">
|
|
1198
|
+
- ```
|
|
1199
|
+
*/
|
|
1200
|
+
```
|
|
1201
|
+
|
|
1202
|
+
/\*\*
|
|
1203
|
+
|
|
1204
|
+
- @ngdoc property
|
|
1205
|
+
- @name $compile.directive.Attributes#$attr
|
|
1206
|
+
-
|
|
1207
|
+
- @description
|
|
1208
|
+
- A map of DOM element attribute names to the normalized name. This is
|
|
1209
|
+
- needed to do reverse lookup from normalized name back to actual name.
|
|
1210
|
+
\*/
|
|
1211
|
+
|
|
1212
|
+
/\*\*
|
|
1213
|
+
|
|
1214
|
+
- @ngdoc method
|
|
1215
|
+
- @name $compile.directive.Attributes#$set
|
|
1216
|
+
- @kind function
|
|
1217
|
+
-
|
|
1218
|
+
- @description
|
|
1219
|
+
- Set DOM element attribute value.
|
|
1220
|
+
-
|
|
1221
|
+
-
|
|
1222
|
+
- @param {string} str1 Normalized element attribute name of the property to modify. The name is
|
|
1223
|
+
- reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}
|
|
1224
|
+
- property to the original name.
|
|
1225
|
+
- @param {string} str2 Value to set the attribute to. The value can be an interpolated string.
|
|
1226
|
+
- @returns {string}
|
|
1227
|
+
\*/
|
package/src/core/filter.md
CHANGED
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
- ```js
|
|
19
19
|
|
|
20
20
|
```
|
|
21
|
+
|
|
21
22
|
- // Filter registration
|
|
22
23
|
- function MyModule($provide, $filterProvider) {
|
|
23
24
|
- // create a service to demonstrate injection (not always needed)
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
- ```
|
|
40
41
|
|
|
41
42
|
```
|
|
43
|
+
|
|
42
44
|
-
|
|
43
45
|
- The filter function is registered with the `$injector` under the filter name suffix with
|
|
44
46
|
- `Filter`.
|
|
@@ -46,6 +48,7 @@
|
|
|
46
48
|
- ```js
|
|
47
49
|
|
|
48
50
|
```
|
|
51
|
+
|
|
49
52
|
- it('should be the same instance', inject(
|
|
50
53
|
- function($filterProvider) {
|
|
51
54
|
- $filterProvider.register('reverse', function(){
|
|
@@ -58,6 +61,7 @@
|
|
|
58
61
|
- ```
|
|
59
62
|
|
|
60
63
|
```
|
|
64
|
+
|
|
61
65
|
-
|
|
62
66
|
-
|
|
63
67
|
- For more information about how AngularJS filters work, and how to create your own filters, see
|
|
@@ -81,31 +85,33 @@
|
|
|
81
85
|
- ```html
|
|
82
86
|
|
|
83
87
|
```
|
|
88
|
+
|
|
84
89
|
- {{ expression [| filter_name[:parameter_value] ... ] }}
|
|
85
90
|
- ```
|
|
86
91
|
|
|
87
92
|
```
|
|
93
|
+
|
|
88
94
|
-
|
|
89
95
|
- @param {String} name Name of the filter function to retrieve
|
|
90
96
|
- @return {Function} the filter function
|
|
91
97
|
- @example
|
|
92
|
-
<example name="$filter" module="filterExample">
|
|
93
|
-
<file name="index.html">
|
|
94
|
-
<div ng-controller="MainCtrl">
|
|
95
|
-
<h3>{{ originalText }}</h3>
|
|
96
|
-
<h3>{{ filteredText }}</h3>
|
|
97
|
-
</div>
|
|
98
|
-
</file>
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
*/
|
|
98
|
+
<example name="$filter" module="filterExample">
|
|
99
|
+
<file name="index.html">
|
|
100
|
+
<div ng-controller="MainCtrl">
|
|
101
|
+
<h3>{{ originalText }}</h3>
|
|
102
|
+
<h3>{{ filteredText }}</h3>
|
|
103
|
+
</div>
|
|
104
|
+
</file>
|
|
105
|
+
|
|
106
|
+
<file name="script.js">
|
|
107
|
+
angular.module('filterExample', [])
|
|
108
|
+
.controller('MainCtrl', function($scope, $filter) {
|
|
109
|
+
$scope.originalText = 'hello';
|
|
110
|
+
$scope.filteredText = $filter('uppercase')($scope.originalText);
|
|
111
|
+
});
|
|
112
|
+
</file>
|
|
113
|
+
</example>
|
|
114
|
+
*/
|
|
109
115
|
|
|
110
116
|
/\*\*
|
|
111
117
|
|
package/src/core/interval.md
CHANGED
|
@@ -38,58 +38,59 @@ _ <file name="index.html">
|
|
|
38
38
|
_ <script>
|
|
39
39
|
_ angular.module('intervalExample', [])
|
|
40
40
|
_ .controller('ExampleController', ['$scope', '$interval',
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
_ //
|
|
41
|
+
|
|
42
|
+
- function($scope, $interval) {
|
|
43
|
+
- $scope.format = 'M/d/yy h:mm:ss a';
|
|
44
|
+
- $scope.blood_1 = 100;
|
|
45
|
+
- $scope.blood_2 = 120;
|
|
46
|
+
-
|
|
47
|
+
- let stop;
|
|
48
|
+
- $scope.fight = function() {
|
|
49
|
+
- // Don't start a new fight if we are already fighting
|
|
50
|
+
- if ( angular.isDefined(stop) ) return;
|
|
51
|
+
-
|
|
52
|
+
- stop = $interval(function() {
|
|
53
|
+
- if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {
|
|
54
|
+
- $scope.blood_1 = $scope.blood_1 - 3;
|
|
55
|
+
- $scope.blood_2 = $scope.blood_2 - 4;
|
|
56
|
+
- } else {
|
|
57
|
+
- $scope.stopFight();
|
|
58
|
+
- }
|
|
59
|
+
- }, 100);
|
|
60
|
+
- };
|
|
61
|
+
-
|
|
62
|
+
- $scope.stopFight = function() {
|
|
63
|
+
- if (angular.isDefined(stop)) {
|
|
64
|
+
- $interval.cancel(stop);
|
|
65
|
+
- stop = undefined;
|
|
66
|
+
- }
|
|
67
|
+
- };
|
|
68
|
+
-
|
|
69
|
+
- $scope.resetFight = function() {
|
|
70
|
+
- $scope.blood_1 = 100;
|
|
71
|
+
- $scope.blood_2 = 120;
|
|
72
|
+
- };
|
|
73
|
+
-
|
|
74
|
+
- $scope.$on('$destroy', function() {
|
|
75
|
+
- // Make sure that the interval is destroyed too
|
|
76
|
+
- $scope.stopFight();
|
|
77
|
+
- });
|
|
78
|
+
- }])
|
|
79
|
+
_ // Register the 'myCurrentTime' directive factory method.
|
|
80
|
+
_ // We inject $interval and dateFilter service since the factory method is DI.
|
|
80
81
|
* .directive('myCurrentTime', ['$interval', 'dateFilter',
|
|
81
|
-
_ function($interval, dateFilter) {
|
|
82
|
-
_ // return the directive link function. (compile function not needed)
|
|
83
|
-
_ return function(scope, element, attrs) {
|
|
84
|
-
_ let format, // date format
|
|
85
|
-
_ stopTime; // so that we can cancel the time updates
|
|
86
|
-
_
|
|
87
|
-
_ // used to update the UI
|
|
88
|
-
_ function updateTime() {
|
|
89
|
-
_ element.text(dateFilter(new Date(), format));
|
|
90
|
-
_ } \*
|
|
91
|
-
_ // watch the expression, and update the UI on change.
|
|
92
|
-
_ scope.$watch(attrs.myCurrentTime, function(value) {
|
|
82
|
+
_ function($interval, dateFilter) {
|
|
83
|
+
_ // return the directive link function. (compile function not needed)
|
|
84
|
+
_ return function(scope, element, attrs) {
|
|
85
|
+
_ let format, // date format
|
|
86
|
+
_ stopTime; // so that we can cancel the time updates
|
|
87
|
+
_
|
|
88
|
+
_ // used to update the UI
|
|
89
|
+
_ function updateTime() {
|
|
90
|
+
_ element.text(dateFilter(new Date(), format));
|
|
91
|
+
_ } \*
|
|
92
|
+
_ // watch the expression, and update the UI on change.
|
|
93
|
+
_ scope.$watch(attrs.myCurrentTime, function(value) {
|
|
93
94
|
* format = value;
|
|
94
95
|
* updateTime();
|
|
95
96
|
* });
|
|
@@ -99,24 +100,24 @@ _ scope.$watch(attrs.myCurrentTime, function(value) {
|
|
|
99
100
|
* // listen on DOM destroy (removal) event, and cancel the next UI update
|
|
100
101
|
* // to prevent updating time after the DOM element was removed.
|
|
101
102
|
* element.on('$destroy', function() {
|
|
102
|
-
_ $interval.cancel(stopTime);
|
|
103
|
-
_ });
|
|
104
|
-
_ }
|
|
105
|
-
_ }]);
|
|
106
|
-
_ </script>
|
|
107
|
-
_
|
|
108
|
-
_ <div>
|
|
109
|
-
_ <div ng-controller="ExampleController">
|
|
110
|
-
_ <label>Date format: <input ng-model="format"></label> <hr/>
|
|
111
|
-
_ Current time is: <span my-current-time="format"></span>
|
|
112
|
-
_ <hr/>
|
|
113
|
-
_ Blood 1 : <font color='red'>{{blood_1}}</font>
|
|
114
|
-
_ Blood 2 : <font color='red'>{{blood_2}}</font>
|
|
115
|
-
_ <button type="button" data-ng-click="fight()">Fight</button>
|
|
116
|
-
_ <button type="button" data-ng-click="stopFight()">StopFight</button>
|
|
117
|
-
_ <button type="button" data-ng-click="resetFight()">resetFight</button>
|
|
118
|
-
_ </div>
|
|
119
|
-
_ </div> \*
|
|
120
|
-
_ </file>
|
|
121
|
-
_ </example>
|
|
122
|
-
\*/
|
|
103
|
+
_ $interval.cancel(stopTime);
|
|
104
|
+
_ });
|
|
105
|
+
_ }
|
|
106
|
+
_ }]);
|
|
107
|
+
_ </script>
|
|
108
|
+
_
|
|
109
|
+
_ <div>
|
|
110
|
+
_ <div ng-controller="ExampleController">
|
|
111
|
+
_ <label>Date format: <input ng-model="format"></label> <hr/>
|
|
112
|
+
_ Current time is: <span my-current-time="format"></span>
|
|
113
|
+
_ <hr/>
|
|
114
|
+
_ Blood 1 : <font color='red'>{{blood_1}}</font>
|
|
115
|
+
_ Blood 2 : <font color='red'>{{blood_2}}</font>
|
|
116
|
+
_ <button type="button" data-ng-click="fight()">Fight</button>
|
|
117
|
+
_ <button type="button" data-ng-click="stopFight()">StopFight</button>
|
|
118
|
+
_ <button type="button" data-ng-click="resetFight()">resetFight</button>
|
|
119
|
+
_ </div>
|
|
120
|
+
_ </div> \*
|
|
121
|
+
_ </file>
|
|
122
|
+
_ </example>
|
|
123
|
+
\*/
|
package/src/core/sce.js
CHANGED
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
} from "./urlUtils";
|
|
6
6
|
import {
|
|
7
7
|
forEach,
|
|
8
|
-
isDefined,
|
|
9
8
|
isFunction,
|
|
10
9
|
isRegExp,
|
|
11
10
|
isString,
|
|
@@ -88,16 +87,6 @@ export function adjustMatcher(matcher) {
|
|
|
88
87
|
);
|
|
89
88
|
}
|
|
90
89
|
|
|
91
|
-
function adjustMatchers(matchers) {
|
|
92
|
-
const adjustedMatchers = [];
|
|
93
|
-
if (isDefined(matchers)) {
|
|
94
|
-
forEach(matchers, (matcher) => {
|
|
95
|
-
adjustedMatchers.push(adjustMatcher(matcher));
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
return adjustedMatchers;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
90
|
/**
|
|
102
91
|
* @ngdoc service
|
|
103
92
|
* @name $sceDelegate
|
|
@@ -222,7 +211,7 @@ export function $SceDelegateProvider() {
|
|
|
222
211
|
*/
|
|
223
212
|
this.trustedResourceUrlList = function (value) {
|
|
224
213
|
if (arguments.length) {
|
|
225
|
-
trustedResourceUrlList =
|
|
214
|
+
trustedResourceUrlList = value.map((v) => adjustMatcher(v));
|
|
226
215
|
}
|
|
227
216
|
return trustedResourceUrlList;
|
|
228
217
|
};
|
|
@@ -254,7 +243,7 @@ export function $SceDelegateProvider() {
|
|
|
254
243
|
*/
|
|
255
244
|
this.bannedResourceUrlList = function (value) {
|
|
256
245
|
if (arguments.length) {
|
|
257
|
-
bannedResourceUrlList =
|
|
246
|
+
bannedResourceUrlList = value.map((v) => adjustMatcher(v));
|
|
258
247
|
}
|
|
259
248
|
return bannedResourceUrlList;
|
|
260
249
|
};
|
package/src/directive/if.js
CHANGED
|
@@ -80,8 +80,7 @@ import { getBlockNodes } from "../jqLite";
|
|
|
80
80
|
*/
|
|
81
81
|
export const ngIfDirective = [
|
|
82
82
|
"$animate",
|
|
83
|
-
|
|
84
|
-
($animate, $compile) => ({
|
|
83
|
+
($animate) => ({
|
|
85
84
|
multiElement: true,
|
|
86
85
|
transclude: "element",
|
|
87
86
|
priority: 600,
|
|
@@ -97,11 +96,7 @@ export const ngIfDirective = [
|
|
|
97
96
|
if (!childScope) {
|
|
98
97
|
$transclude((clone, newScope) => {
|
|
99
98
|
childScope = newScope;
|
|
100
|
-
|
|
101
|
-
clone[clone.length++] = $compile.$$createComment(
|
|
102
|
-
"end ngIf",
|
|
103
|
-
$attr.ngIf,
|
|
104
|
-
);
|
|
99
|
+
clone[clone.length++] = document.createComment("");
|
|
105
100
|
// Note: We only need the first/last node of the cloned nodes.
|
|
106
101
|
// However, we need to keep the reference to the jqlite wrapper as it might be changed later
|
|
107
102
|
// by a directive with templateUrl when its template arrives.
|