MCPcopy Index your code
hub / github.com/angular/angular / createChildScope

Method createChildScope

packages/compiler/src/typecheck/ops/scope.ts:375–382  ·  view source on GitHub ↗

* Constructs a `Scope` given either a `Template` or a list of `Node`s. * This is identical to `Scope.forNodes` which we can't reference in some ops due to * circular dependencies. *. * @param parentScope the `Scope` of the parent template. * @param scopedNode Node that provides the sc

(
    parentScope: Scope,
    scopedNode: Template | IfBlockBranch | ForLoopBlock | HostElement | null,
    children: Node[] | null,
    guard: TcbExpr | null,
  )

Source from the content-addressed store, hash-verified

373 * @param guard an expression that is applied to this scope for type narrowing purposes.
374 */
375 createChildScope(
376 parentScope: Scope,
377 scopedNode: Template | IfBlockBranch | ForLoopBlock | HostElement | null,
378 children: Node[] | null,
379 guard: TcbExpr | null,
380 ): Scope {
381 return Scope.forNodes(this.tcb, parentScope, scopedNode, children, guard);
382 }
383
384 private resolveLocal(ref: LocalSymbol, directive?: TcbDirectiveMetadata): TcbExpr | null {
385 if (ref instanceof Reference && this.referenceOpMap.has(ref)) {

Callers 5

generateBranchMethod · 0.80
getBranchScopeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80
executeMethod · 0.80

Calls 1

forNodesMethod · 0.80

Tested by

no test coverage detected