Skip to content

Commit dc4f28f

Browse files
author
Anatoly Ostrovsky
committed
Remove deprecated method calls
1 parent 4ff432b commit dc4f28f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ tsconfig.tsbuildinfo
1010
.idea
1111
.vscode
1212
qodana.yaml
13+
angular.ts.iml

src/core/compile/compile.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
10101010
name = name
10111011
.replace(PREFIX_REGEXP, "")
10121012
.toLowerCase()
1013-
.substr(4 + ngPrefixMatch[1].length)
1013+
.substring(4 + ngPrefixMatch[1].length)
10141014
.replace(/_(.)/g, (match, letter) => letter.toUpperCase());
10151015

10161016
// Support *-start / *-end multi element directives
@@ -1019,8 +1019,8 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
10191019
directiveIsMultiElement(multiElementMatch[1])
10201020
) {
10211021
attrStartName = name;
1022-
attrEndName = `${name.substr(0, name.length - 5)}end`;
1023-
name = name.substr(0, name.length - 6);
1022+
attrEndName = `${name.substring(0, name.length - 5)}end`;
1023+
name = name.substring(0, name.length - 6);
10241024
}
10251025

10261026
if (isNgProp || isNgEvent) {
@@ -2100,7 +2100,7 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
21002100
*
21012101
* @param {string} name name of the directive to look up.
21022102
* @param {string} location The directive must be found in specific format.
2103-
* String containing any of theses characters:
2103+
* String containing any of these characters:
21042104
*
21052105
* * `E`: element name
21062106
* * `A': attribute
@@ -2115,8 +2115,8 @@ export function CompileProvider($provide, $$sanitizeUriProvider) {
21152115
startAttrName,
21162116
endAttrName,
21172117
) {
2118-
if (name === ignoreDirective) return null;
2119-
let match = null;
2118+
if (name === ignoreDirective) return false;
2119+
let match = false;
21202120
if (Object.prototype.hasOwnProperty.call(hasDirectives, name)) {
21212121
for (
21222122
let directive,

0 commit comments

Comments
 (0)