formacao
This commit is contained in:
+31
-31
@@ -274,7 +274,7 @@ import {
|
||||
stringify,
|
||||
stringifyForError,
|
||||
throwError2 as throwError,
|
||||
throwProviderNotFoundError,
|
||||
throwProvidernotfoundError,
|
||||
unwrapLView,
|
||||
unwrapRNode,
|
||||
updateAncestorTraversalFlagsOnAttach,
|
||||
@@ -1154,33 +1154,33 @@ function injectAttributeImpl(tNode, attrNameToInject) {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function notFoundValueOrThrow(notFoundValue, token, flags) {
|
||||
if (flags & 8 || notFoundValue !== void 0) {
|
||||
return notFoundValue;
|
||||
function notfoundValueOrThrow(notfoundValue, token, flags) {
|
||||
if (flags & 8 || notfoundValue !== void 0) {
|
||||
return notfoundValue;
|
||||
} else {
|
||||
throwProviderNotFoundError(token, "NodeInjector");
|
||||
throwProvidernotfoundError(token, "NodeInjector");
|
||||
}
|
||||
}
|
||||
function lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue) {
|
||||
if (flags & 8 && notFoundValue === void 0) {
|
||||
notFoundValue = null;
|
||||
function lookupTokenUsingModuleInjector(lView, token, flags, notfoundValue) {
|
||||
if (flags & 8 && notfoundValue === void 0) {
|
||||
notfoundValue = null;
|
||||
}
|
||||
if ((flags & (2 | 1)) === 0) {
|
||||
const moduleInjector = lView[INJECTOR];
|
||||
const previousInjectImplementation = setInjectImplementation(void 0);
|
||||
try {
|
||||
if (moduleInjector) {
|
||||
return moduleInjector.get(token, notFoundValue, flags & 8);
|
||||
return moduleInjector.get(token, notfoundValue, flags & 8);
|
||||
} else {
|
||||
return injectRootLimpMode(token, notFoundValue, flags & 8);
|
||||
return injectRootLimpMode(token, notfoundValue, flags & 8);
|
||||
}
|
||||
} finally {
|
||||
setInjectImplementation(previousInjectImplementation);
|
||||
}
|
||||
}
|
||||
return notFoundValueOrThrow(notFoundValue, token, flags);
|
||||
return notfoundValueOrThrow(notfoundValue, token, flags);
|
||||
}
|
||||
function getOrCreateInjectable(tNode, lView, token, flags = 0, notFoundValue) {
|
||||
function getOrCreateInjectable(tNode, lView, token, flags = 0, notfoundValue) {
|
||||
if (tNode !== null) {
|
||||
if (lView[FLAGS] & 2048 && !(flags & 2)) {
|
||||
const embeddedInjectorValue = lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, NOT_FOUND);
|
||||
@@ -1193,13 +1193,13 @@ function getOrCreateInjectable(tNode, lView, token, flags = 0, notFoundValue) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
|
||||
return lookupTokenUsingModuleInjector(lView, token, flags, notfoundValue);
|
||||
}
|
||||
function lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue) {
|
||||
function lookupTokenUsingNodeInjector(tNode, lView, token, flags, notfoundValue) {
|
||||
const bloomHash = bloomHashBitOrFactory(token);
|
||||
if (typeof bloomHash === "function") {
|
||||
if (!enterDI(lView, tNode, flags)) {
|
||||
return flags & 1 ? notFoundValueOrThrow(notFoundValue, token, flags) : lookupTokenUsingModuleInjector(lView, token, flags, notFoundValue);
|
||||
return flags & 1 ? notfoundValueOrThrow(notfoundValue, token, flags) : lookupTokenUsingModuleInjector(lView, token, flags, notfoundValue);
|
||||
}
|
||||
try {
|
||||
let value;
|
||||
@@ -1213,7 +1213,7 @@ function lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue)
|
||||
value = bloomHash(flags);
|
||||
}
|
||||
if (value == null && !(flags & 8)) {
|
||||
throwProviderNotFoundError(token);
|
||||
throwProvidernotfoundError(token);
|
||||
} else {
|
||||
return value;
|
||||
}
|
||||
@@ -1255,7 +1255,7 @@ function lookupTokenUsingNodeInjector(tNode, lView, token, flags, notFoundValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
return notFoundValue;
|
||||
return notfoundValue;
|
||||
}
|
||||
function searchTokensOnInjector(injectorIndex, lView, token, previousTView, flags, hostTElementNode) {
|
||||
const currentTView = lView[TVIEW];
|
||||
@@ -1379,8 +1379,8 @@ var NodeInjector = class {
|
||||
this._tNode = _tNode;
|
||||
this._lView = _lView;
|
||||
}
|
||||
get(token, notFoundValue, flags) {
|
||||
return getOrCreateInjectable(this._tNode, this._lView, token, convertToBitFlags(flags), notFoundValue);
|
||||
get(token, notfoundValue, flags) {
|
||||
return getOrCreateInjectable(this._tNode, this._lView, token, convertToBitFlags(flags), notfoundValue);
|
||||
}
|
||||
};
|
||||
function createNodeInjector() {
|
||||
@@ -1411,7 +1411,7 @@ function getFactoryOf(type) {
|
||||
}
|
||||
return getFactoryDef(type);
|
||||
}
|
||||
function lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundValue) {
|
||||
function lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notfoundValue) {
|
||||
let currentTNode = tNode;
|
||||
let currentLView = lView;
|
||||
while (currentTNode !== null && currentLView !== null && currentLView[FLAGS] & 2048 && !isRootView(currentLView)) {
|
||||
@@ -1434,7 +1434,7 @@ function lookupTokenUsingEmbeddedInjector(tNode, lView, token, flags, notFoundVa
|
||||
}
|
||||
currentTNode = parentTNode;
|
||||
}
|
||||
return notFoundValue;
|
||||
return notfoundValue;
|
||||
}
|
||||
function getTNodeFromLView(lView) {
|
||||
const tView = lView[TVIEW];
|
||||
@@ -6537,7 +6537,7 @@ function validateNodeExists(node, lView = null, tNode = null) {
|
||||
${footer}`);
|
||||
}
|
||||
}
|
||||
function nodeNotFoundError(lView, tNode) {
|
||||
function nodenotfoundError(lView, tNode) {
|
||||
const header = "During serialization, Angular was unable to find an element in the DOM:\n\n";
|
||||
const expected = `${describeExpectedDom(lView, tNode, false)}
|
||||
|
||||
@@ -6545,7 +6545,7 @@ function nodeNotFoundError(lView, tNode) {
|
||||
const footer = getHydrationErrorFooter();
|
||||
throw new RuntimeError(-502, header + expected + footer);
|
||||
}
|
||||
function nodeNotFoundAtPathError(host, path) {
|
||||
function nodenotfoundAtPathError(host, path) {
|
||||
const header = `During hydration Angular was unable to locate a node using the "${path}" path, starting from the ${describeRNode(host)} node.
|
||||
|
||||
`;
|
||||
@@ -7097,7 +7097,7 @@ function navigateToNode(from, instructions) {
|
||||
const repeat = instructions[i + 1];
|
||||
for (let r = 0; r < repeat; r++) {
|
||||
if (ngDevMode && !node) {
|
||||
throw nodeNotFoundAtPathError(from, stringifyNavigationInstructions(instructions));
|
||||
throw nodenotfoundAtPathError(from, stringifyNavigationInstructions(instructions));
|
||||
}
|
||||
switch (step) {
|
||||
case NODE_NAVIGATION_STEP_FIRST_CHILD:
|
||||
@@ -7110,7 +7110,7 @@ function navigateToNode(from, instructions) {
|
||||
}
|
||||
}
|
||||
if (ngDevMode && !node) {
|
||||
throw nodeNotFoundAtPathError(from, stringifyNavigationInstructions(instructions));
|
||||
throw nodenotfoundAtPathError(from, stringifyNavigationInstructions(instructions));
|
||||
}
|
||||
return node;
|
||||
}
|
||||
@@ -7182,7 +7182,7 @@ function calcPathForNode(tNode, lView, excludedParentNodes) {
|
||||
const body = parentRNode.ownerDocument.body;
|
||||
path = calcPathBetween(body, rNode, REFERENCE_NODE_BODY);
|
||||
if (path === null) {
|
||||
throw nodeNotFoundError(lView, tNode);
|
||||
throw nodenotfoundError(lView, tNode);
|
||||
}
|
||||
}
|
||||
return path;
|
||||
@@ -7978,12 +7978,12 @@ var ChainedInjector = class {
|
||||
this.injector = injector;
|
||||
this.parentInjector = parentInjector;
|
||||
}
|
||||
get(token, notFoundValue, options) {
|
||||
get(token, notfoundValue, options) {
|
||||
const value = this.injector.get(token, NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR, options);
|
||||
if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || notFoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
|
||||
if (value !== NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR || notfoundValue === NOT_FOUND_CHECK_ONLY_ELEMENT_INJECTOR) {
|
||||
return value;
|
||||
}
|
||||
return this.parentInjector.get(token, notFoundValue, options);
|
||||
return this.parentInjector.get(token, notfoundValue, options);
|
||||
}
|
||||
};
|
||||
function computeStaticStyling(tNode, attrs, writeToHost) {
|
||||
@@ -16911,7 +16911,7 @@ function getPipeDef2(name, registry) {
|
||||
}
|
||||
}
|
||||
if (ngDevMode) {
|
||||
throw new RuntimeError(-302, getPipeNotFoundErrorMessage(name));
|
||||
throw new RuntimeError(-302, getPipenotfoundErrorMessage(name));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -16925,7 +16925,7 @@ function getMultipleMatchingPipesMessage(name) {
|
||||
const errorMessage = `Multiple pipes match the name \`${name}\`${componentInfoMessage}. ${verifyMessage}`;
|
||||
return errorMessage;
|
||||
}
|
||||
function getPipeNotFoundErrorMessage(name) {
|
||||
function getPipenotfoundErrorMessage(name) {
|
||||
const lView = getLView();
|
||||
const declarationLView = lView[DECLARATION_COMPONENT_VIEW];
|
||||
const context = declarationLView[CONTEXT];
|
||||
|
||||
Reference in New Issue
Block a user