@angular-wave/angular.ts 0.0.6 → 0.0.8

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 (74) hide show
  1. package/dist/angular-ts.cjs.js +1 -1
  2. package/dist/angular-ts.esm.js +1 -1
  3. package/dist/angular-ts.umd.js +1 -1
  4. package/docs/.cspell.yml +8 -0
  5. package/docs/.github/dependabot.yml +14 -0
  6. package/docs/.nvmrc +1 -0
  7. package/docs/CONTRIBUTING.md +28 -0
  8. package/docs/Dockerfile +4 -0
  9. package/docs/LICENSE +201 -0
  10. package/docs/README.md +184 -0
  11. package/docs/assets/scss/_variables_project.scss +6 -0
  12. package/docs/config.yaml +15 -0
  13. package/docs/content/en/_index.md +77 -0
  14. package/docs/content/en/about/featured-background.jpg +0 -0
  15. package/docs/content/en/about/index.md +35 -0
  16. package/docs/content/en/blog/_index.md +8 -0
  17. package/docs/content/en/blog/news/_index.md +4 -0
  18. package/docs/content/en/blog/news/first-post/featured-sunset-get.png +0 -0
  19. package/docs/content/en/blog/news/first-post/index.md +48 -0
  20. package/docs/content/en/blog/news/second-post.md +244 -0
  21. package/docs/content/en/blog/releases/_index.md +4 -0
  22. package/docs/content/en/blog/releases/in-depth-monoliths-detailed-spec.md +244 -0
  23. package/docs/content/en/community/_index.md +6 -0
  24. package/docs/content/en/docs/_index.md +29 -0
  25. package/docs/content/en/docs/concepts/_index.md +14 -0
  26. package/docs/content/en/docs/contribution-guidelines/_index.md +79 -0
  27. package/docs/content/en/docs/examples/_index.md +13 -0
  28. package/docs/content/en/docs/getting-started/_index.md +35 -0
  29. package/docs/content/en/docs/getting-started/example-page.md +240 -0
  30. package/docs/content/en/docs/overview/_index.md +36 -0
  31. package/docs/content/en/docs/reference/_index.md +12 -0
  32. package/docs/content/en/docs/reference/parameter-reference.md +211 -0
  33. package/docs/content/en/docs/tasks/Ponycopters/_index.md +12 -0
  34. package/docs/content/en/docs/tasks/Ponycopters/configuring-ponycopters.md +238 -0
  35. package/docs/content/en/docs/tasks/Ponycopters/launching-ponycopters.md +236 -0
  36. package/docs/content/en/docs/tasks/_index.md +21 -0
  37. package/docs/content/en/docs/tasks/beds.md +237 -0
  38. package/docs/content/en/docs/tasks/porridge.md +237 -0
  39. package/docs/content/en/docs/tasks/task.md +237 -0
  40. package/docs/content/en/docs/tutorials/_index.md +13 -0
  41. package/docs/content/en/docs/tutorials/multi-bear.md +236 -0
  42. package/docs/content/en/docs/tutorials/tutorial2.md +236 -0
  43. package/docs/content/en/featured-background.jpg +0 -0
  44. package/docs/content/en/search.md +4 -0
  45. package/docs/docker-compose.yaml +13 -0
  46. package/docs/docsy.work +5 -0
  47. package/docs/docsy.work.sum +0 -0
  48. package/docs/go.mod +5 -0
  49. package/docs/go.sum +6 -0
  50. package/docs/hugo-disabled.toml +221 -0
  51. package/docs/hugo.yaml +220 -0
  52. package/docs/layouts/404.html +7 -0
  53. package/docs/layouts/_default/_markup/render-heading.html +1 -0
  54. package/docs/netlify.toml +12 -0
  55. package/docs/package.json +42 -0
  56. package/package.json +1 -1
  57. package/src/core/compile.js +15 -168
  58. package/src/core/compile.md +51 -16
  59. package/src/core/filter.js +0 -110
  60. package/src/core/filter.md +132 -0
  61. package/src/core/interval.js +0 -126
  62. package/src/core/interval.md +123 -0
  63. package/src/core/location.js +1 -2
  64. package/src/core/sce.js +2 -13
  65. package/src/injector.js +0 -630
  66. package/src/injector.md +740 -0
  67. package/src/jqLite.js +1 -1
  68. package/src/loader.js +1 -15
  69. package/src/loader.md +13 -0
  70. package/test/jqlite.spec.js +4 -4
  71. package/test/messages/messages.spec.js +1 -1
  72. package/test/ng/compile.spec.js +118 -316
  73. package/test/ng/directive/form.spec.js +8 -8
  74. package/src/route-to-reg-exp.js +0 -41
@@ -4,120 +4,10 @@ import { jsonFilter } from "../filters/filters";
4
4
  import { limitToFilter } from "../filters/limit-to";
5
5
  import { orderByFilter } from "../filters/order-by";
6
6
 
7
- /**
8
- * @ngdoc provider
9
- * @name $filterProvider
10
- * @description
11
- *
12
- * Filters are just functions which transform input to an output. However filters need to be
13
- * Dependency Injected. To achieve this a filter definition consists of a factory function which is
14
- * annotated with dependencies and is responsible for creating a filter function.
15
- *
16
- * <div class="alert alert-warning">
17
- * **Note:** Filter names must be valid AngularJS {@link expression} identifiers, such as `uppercase` or `orderBy`.
18
- * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
19
- * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
20
- * (`myapp_subsection_filterx`).
21
- * </div>
22
- *
23
- * ```js
24
- * // Filter registration
25
- * function MyModule($provide, $filterProvider) {
26
- * // create a service to demonstrate injection (not always needed)
27
- * $provide.value('greet', function(name){
28
- * return 'Hello ' + name + '!';
29
- * });
30
- *
31
- * // register a filter factory which uses the
32
- * // greet service to demonstrate DI.
33
- * $filterProvider.register('greet', function(greet){
34
- * // return the filter function which uses the greet service
35
- * // to generate salutation
36
- * return function(text) {
37
- * // filters need to be forgiving so check input validity
38
- * return text && greet(text) || text;
39
- * };
40
- * });
41
- * }
42
- * ```
43
- *
44
- * The filter function is registered with the `$injector` under the filter name suffix with
45
- * `Filter`.
46
- *
47
- * ```js
48
- * it('should be the same instance', inject(
49
- * function($filterProvider) {
50
- * $filterProvider.register('reverse', function(){
51
- * return ...;
52
- * });
53
- * },
54
- * function($filter, reverseFilter) {
55
- * expect($filter('reverse')).toBe(reverseFilter);
56
- * });
57
- * ```
58
- *
59
- *
60
- * For more information about how AngularJS filters work, and how to create your own filters, see
61
- * {@link guide/filter Filters} in the AngularJS Developer Guide.
62
- */
63
-
64
- /**
65
- * @ngdoc service
66
- * @name $filter
67
- * @kind function
68
- * @description
69
- * Filters are used for formatting data displayed to the user.
70
- *
71
- * They can be used in view templates, controllers or services. AngularJS comes
72
- * with a collection of [built-in filters](api/ng/filter), but it is easy to
73
- * define your own as well.
74
- *
75
- * The general syntax in templates is as follows:
76
- *
77
- * ```html
78
- * {{ expression [| filter_name[:parameter_value] ... ] }}
79
- * ```
80
- *
81
- * @param {String} name Name of the filter function to retrieve
82
- * @return {Function} the filter function
83
- * @example
84
- <example name="$filter" module="filterExample">
85
- <file name="index.html">
86
- <div ng-controller="MainCtrl">
87
- <h3>{{ originalText }}</h3>
88
- <h3>{{ filteredText }}</h3>
89
- </div>
90
- </file>
91
-
92
- <file name="script.js">
93
- angular.module('filterExample', [])
94
- .controller('MainCtrl', function($scope, $filter) {
95
- $scope.originalText = 'hello';
96
- $scope.filteredText = $filter('uppercase')($scope.originalText);
97
- });
98
- </file>
99
- </example>
100
- */
101
7
  $FilterProvider.$inject = ["$provide"];
102
8
  export function $FilterProvider($provide) {
103
9
  const suffix = "Filter";
104
10
 
105
- /**
106
- * @ngdoc method
107
- * @name $filterProvider#register
108
- * @param {string|Object} name Name of the filter function, or an object map of filters where
109
- * the keys are the filter names and the values are the filter factories.
110
- *
111
- * <div class="alert alert-warning">
112
- * **Note:** Filter names must be valid AngularJS {@link expression} identifiers, such as `uppercase` or `orderBy`.
113
- * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
114
- * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
115
- * (`myapp_subsection_filterx`).
116
- * </div>
117
- * @param {Function} factory If the first argument was a string, a factory function for the filter to be registered.
118
- * @returns {Object} Registered filter instance, or if a map of filters was provided then a map
119
- * of the registered filter instances.
120
- */
121
11
  function register(name, factory) {
122
12
  if (isObject(name)) {
123
13
  const filters = {};
@@ -0,0 +1,132 @@
1
+ /\*\*
2
+
3
+ - @ngdoc provider
4
+ - @name $filterProvider
5
+ - @description
6
+ -
7
+ - Filters are just functions which transform input to an output. However filters need to be
8
+ - Dependency Injected. To achieve this a filter definition consists of a factory function which is
9
+ - annotated with dependencies and is responsible for creating a filter function.
10
+ -
11
+ - <div class="alert alert-warning">
12
+ - **Note:** Filter names must be valid AngularJS {@link expression} identifiers, such as `uppercase` or `orderBy`.
13
+ - Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
14
+ - your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
15
+ - (`myapp_subsection_filterx`).
16
+ - </div>
17
+ -
18
+ - ```js
19
+
20
+ ```
21
+
22
+ - // Filter registration
23
+ - function MyModule($provide, $filterProvider) {
24
+ - // create a service to demonstrate injection (not always needed)
25
+ - $provide.value('greet', function(name){
26
+ - return 'Hello ' + name + '!';
27
+ - });
28
+ -
29
+ - // register a filter factory which uses the
30
+ - // greet service to demonstrate DI.
31
+ - $filterProvider.register('greet', function(greet){
32
+ - // return the filter function which uses the greet service
33
+ - // to generate salutation
34
+ - return function(text) {
35
+ - // filters need to be forgiving so check input validity
36
+ - return text && greet(text) || text;
37
+ - };
38
+ - });
39
+ - }
40
+ - ```
41
+
42
+ ```
43
+
44
+ -
45
+ - The filter function is registered with the `$injector` under the filter name suffix with
46
+ - `Filter`.
47
+ -
48
+ - ```js
49
+
50
+ ```
51
+
52
+ - it('should be the same instance', inject(
53
+ - function($filterProvider) {
54
+ - $filterProvider.register('reverse', function(){
55
+ - return ...;
56
+ - });
57
+ - },
58
+ - function($filter, reverseFilter) {
59
+ - expect($filter('reverse')).toBe(reverseFilter);
60
+ - });
61
+ - ```
62
+
63
+ ```
64
+
65
+ -
66
+ -
67
+ - For more information about how AngularJS filters work, and how to create your own filters, see
68
+ - {@link guide/filter Filters} in the AngularJS Developer Guide.
69
+ \*/
70
+
71
+ /\*\*
72
+
73
+ - @ngdoc service
74
+ - @name $filter
75
+ - @kind function
76
+ - @description
77
+ - Filters are used for formatting data displayed to the user.
78
+ -
79
+ - They can be used in view templates, controllers or services. AngularJS comes
80
+ - with a collection of [built-in filters](api/ng/filter), but it is easy to
81
+ - define your own as well.
82
+ -
83
+ - The general syntax in templates is as follows:
84
+ -
85
+ - ```html
86
+
87
+ ```
88
+
89
+ - {{ expression [| filter_name[:parameter_value] ... ] }}
90
+ - ```
91
+
92
+ ```
93
+
94
+ -
95
+ - @param {String} name Name of the filter function to retrieve
96
+ - @return {Function} the filter function
97
+ - @example
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
+ */
115
+
116
+ /\*\*
117
+
118
+ - @ngdoc method
119
+ - @name $filterProvider#register
120
+ - @param {string|Object} name Name of the filter function, or an object map of filters where
121
+ - the keys are the filter names and the values are the filter factories.
122
+ -
123
+ - <div class="alert alert-warning">
124
+ - **Note:** Filter names must be valid AngularJS {@link expression} identifiers, such as `uppercase` or `orderBy`.
125
+ - Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
126
+ - your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
127
+ - (`myapp_subsection_filterx`).
128
+ - </div>
129
+ - @param {Function} factory If the first argument was a string, a factory function for the filter to be registered.
130
+ - @returns {Object} Registered filter instance, or if a map of filters was provided then a map
131
+ - of the registered filter instances.
132
+ \*/
@@ -18,132 +18,6 @@ export function $IntervalProvider() {
18
18
  delete intervals[id];
19
19
  };
20
20
 
21
- /**
22
- * @ngdoc service
23
- * @name $interval
24
- *
25
- * @description
26
- * AngularJS's wrapper for `window.setInterval`. The `fn` function is executed every `delay`
27
- * milliseconds.
28
- *
29
- * The return value of registering an interval function is a promise. This promise will be
30
- * notified upon each tick of the interval, and will be resolved after `count` iterations, or
31
- * run indefinitely if `count` is not defined. The value of the notification will be the
32
- * number of iterations that have run.
33
- * To cancel an interval, call `$interval.cancel(promise)`.
34
- *
35
- * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to
36
- * move forward by `millis` milliseconds and trigger any functions scheduled to run in that
37
- * time.
38
- *
39
- * <div class="alert alert-warning">
40
- * **Note**: Intervals created by this service must be explicitly destroyed when you are finished
41
- * with them. In particular they are not automatically destroyed when a controller's scope or a
42
- * directive's element are destroyed.
43
- * You should take this into consideration and make sure to always cancel the interval at the
44
- * appropriate moment. See the example below for more details on how and when to do this.
45
- * </div>
46
- *
47
- * @param {function()} fn A function that should be called repeatedly. If no additional arguments
48
- * are passed (see below), the function is called with the current iteration count.
49
- * @param {number} delay Number of milliseconds between each function call.
50
- * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat
51
- * indefinitely.
52
- * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
53
- * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
54
- * @param {...*=} Pass additional parameters to the executed function.
55
- * @returns {promise} A promise which will be notified on each iteration. It will resolve once all iterations of the interval complete.
56
- *
57
- * @example
58
- * <example module="intervalExample" name="interval-service">
59
- * <file name="index.html">
60
- * <script>
61
- * angular.module('intervalExample', [])
62
- * .controller('ExampleController', ['$scope', '$interval',
63
- * function($scope, $interval) {
64
- * $scope.format = 'M/d/yy h:mm:ss a';
65
- * $scope.blood_1 = 100;
66
- * $scope.blood_2 = 120;
67
- *
68
- * let stop;
69
- * $scope.fight = function() {
70
- * // Don't start a new fight if we are already fighting
71
- * if ( angular.isDefined(stop) ) return;
72
- *
73
- * stop = $interval(function() {
74
- * if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {
75
- * $scope.blood_1 = $scope.blood_1 - 3;
76
- * $scope.blood_2 = $scope.blood_2 - 4;
77
- * } else {
78
- * $scope.stopFight();
79
- * }
80
- * }, 100);
81
- * };
82
- *
83
- * $scope.stopFight = function() {
84
- * if (angular.isDefined(stop)) {
85
- * $interval.cancel(stop);
86
- * stop = undefined;
87
- * }
88
- * };
89
- *
90
- * $scope.resetFight = function() {
91
- * $scope.blood_1 = 100;
92
- * $scope.blood_2 = 120;
93
- * };
94
- *
95
- * $scope.$on('$destroy', function() {
96
- * // Make sure that the interval is destroyed too
97
- * $scope.stopFight();
98
- * });
99
- * }])
100
- * // Register the 'myCurrentTime' directive factory method.
101
- * // We inject $interval and dateFilter service since the factory method is DI.
102
- * .directive('myCurrentTime', ['$interval', 'dateFilter',
103
- * function($interval, dateFilter) {
104
- * // return the directive link function. (compile function not needed)
105
- * return function(scope, element, attrs) {
106
- * let format, // date format
107
- * stopTime; // so that we can cancel the time updates
108
- *
109
- * // used to update the UI
110
- * function updateTime() {
111
- * element.text(dateFilter(new Date(), format));
112
- * }
113
- *
114
- * // watch the expression, and update the UI on change.
115
- * scope.$watch(attrs.myCurrentTime, function(value) {
116
- * format = value;
117
- * updateTime();
118
- * });
119
- *
120
- * stopTime = $interval(updateTime, 1000);
121
- *
122
- * // listen on DOM destroy (removal) event, and cancel the next UI update
123
- * // to prevent updating time after the DOM element was removed.
124
- * element.on('$destroy', function() {
125
- * $interval.cancel(stopTime);
126
- * });
127
- * }
128
- * }]);
129
- * </script>
130
- *
131
- * <div>
132
- * <div ng-controller="ExampleController">
133
- * <label>Date format: <input ng-model="format"></label> <hr/>
134
- * Current time is: <span my-current-time="format"></span>
135
- * <hr/>
136
- * Blood 1 : <font color='red'>{{blood_1}}</font>
137
- * Blood 2 : <font color='red'>{{blood_2}}</font>
138
- * <button type="button" data-ng-click="fight()">Fight</button>
139
- * <button type="button" data-ng-click="stopFight()">StopFight</button>
140
- * <button type="button" data-ng-click="resetFight()">resetFight</button>
141
- * </div>
142
- * </div>
143
- *
144
- * </file>
145
- * </example>
146
- */
147
21
  const interval = $$intervalFactory(setIntervalFn, clearIntervalFn);
148
22
 
149
23
  /**
@@ -0,0 +1,123 @@
1
+ /**
2
+ _ @ngdoc service
3
+ _ @name $interval
4
+ *
5
+ * @description
6
+ * AngularJS's wrapper for `window.setInterval`. The `fn` function is executed every `delay`
7
+ * milliseconds.
8
+ *
9
+ * The return value of registering an interval function is a promise. This promise will be
10
+ * notified upon each tick of the interval, and will be resolved after `count` iterations, or
11
+ * run indefinitely if `count` is not defined. The value of the notification will be the
12
+ * number of iterations that have run.
13
+ * To cancel an interval, call `$interval.cancel(promise)`.
14
+ *
15
+ * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to
16
+ * move forward by `millis` milliseconds and trigger any functions scheduled to run in that
17
+ _ time.
18
+ _
19
+ _ <div class="alert alert-warning">
20
+ _ **Note\*_: Intervals created by this service must be explicitly destroyed when you are finished
21
+ _ with them. In particular they are not automatically destroyed when a controller's scope or a
22
+ _ directive's element are destroyed.
23
+ _ You should take this into consideration and make sure to always cancel the interval at the
24
+ _ appropriate moment. See the example below for more details on how and when to do this.
25
+ _ </div> \*
26
+ _ @param {function()} fn A function that should be called repeatedly. If no additional arguments
27
+ _ are passed (see below), the function is called with the current iteration count.
28
+ _ @param {number} delay Number of milliseconds between each function call.
29
+ _ @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat
30
+ _ indefinitely.
31
+ _ @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
32
+ _ will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
33
+ _ @param {..._=} Pass additional parameters to the executed function.
34
+ _ @returns {promise} A promise which will be notified on each iteration. It will resolve once all iterations of the interval complete. \*
35
+ _ @example
36
+ _ <example module="intervalExample" name="interval-service">
37
+ _ <file name="index.html">
38
+ _ <script>
39
+ _ angular.module('intervalExample', [])
40
+ _ .controller('ExampleController', ['$scope', '$interval',
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.
81
+ * .directive('myCurrentTime', ['$interval', 'dateFilter',
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) {
94
+ * format = value;
95
+ * updateTime();
96
+ * });
97
+ *
98
+ * stopTime = $interval(updateTime, 1000);
99
+ *
100
+ * // listen on DOM destroy (removal) event, and cancel the next UI update
101
+ * // to prevent updating time after the DOM element was removed.
102
+ * element.on('$destroy', function() {
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
+ \*/
@@ -10,7 +10,6 @@ import {
10
10
  isString,
11
11
  isUndefined,
12
12
  minErr,
13
- nodeName_,
14
13
  parseKeyValue,
15
14
  toInt,
16
15
  toKeyValue,
@@ -932,7 +931,7 @@ export function $LocationProvider() {
932
931
  let elm = jqLite(event.target);
933
932
 
934
933
  // traverse the DOM up to find first A tag
935
- while (nodeName_(elm[0]) !== "a") {
934
+ while (elm[0].nodeName.toLowerCase() !== "a") {
936
935
  // ignore rewriting if no A tag (reached root element, or no parent - removed from document)
937
936
  if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;
938
937
  }
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 = adjustMatchers(value);
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 = adjustMatchers(value);
246
+ bannedResourceUrlList = value.map((v) => adjustMatcher(v));
258
247
  }
259
248
  return bannedResourceUrlList;
260
249
  };