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

Function lastSelectedElementIdx

packages/core/src/render3/view/directives.ts:519–528  ·  view source on GitHub ↗

* Returns the last selected element index in the `HostBindingOpCodes` * * For perf reasons we don't need to update the selected element index in `HostBindingOpCodes` only * if it changes. This method returns the last index (or '0' if not found.) * * Selected element index are only the ones whic

(hostBindingOpCodes: HostBindingOpCodes)

Source from the content-addressed store, hash-verified

517 * Selected element index are only the ones which are negative.
518 */
519function lastSelectedElementIdx(hostBindingOpCodes: HostBindingOpCodes): number {
520 let i = hostBindingOpCodes.length;
521 while (i > 0) {
522 const value = hostBindingOpCodes[--i];
523 if (typeof value === 'number' && value < 0) {
524 return value;
525 }
526 }
527 return 0;
528}
529
530/**
531 * Builds up an export map as directives are created, so local refs can be quickly mapped

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…