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

Function isValidStateChange

packages/core/src/defer/rendering.ts:409–414  ·  view source on GitHub ↗

* Checks whether we can transition to the next state. * * We transition to the next state if the previous state was represented * with a number that is less than the next state. For example, if the current * state is "loading" (represented as `1`), we should not show a placeholder * (represente

(
  currentState: DeferBlockState | DeferBlockInternalState,
  newState: DeferBlockState,
)

Source from the content-addressed store, hash-verified

407 * or an error state (represented as `3`).
408 */
409function isValidStateChange(
410 currentState: DeferBlockState | DeferBlockInternalState,
411 newState: DeferBlockState,
412): boolean {
413 return currentState < newState;
414}
415
416/** Utility function to render placeholder content (if present) */
417export function renderPlaceholder(lView: LView, tNode: TNode) {

Callers 1

renderDeferBlockStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…