angular/angular · error · Error
@loading block can only have one "minimum" parameter
Error message
@loading block can only have one "minimum" parameter
What it means
An @loading sub-block of @defer declares the `minimum` parameter more than once. `minimum` controls how long the loading indicator stays visible once shown; the compiler keeps it in a single `minimumTime` field, so when the parameter loop encounters a second /^minimum\s/ match while `minimumTime != null`, it throws.
Source
Thrown at packages/compiler/src/render3/r3_deferred_blocks.ts:226
for (const param of ast.parameters) {
if (AFTER_PARAMETER_PATTERN.test(param.expression)) {
if (afterTime != null) {
throw new Error(`@loading block can only have one "after" parameter`);
}
const parsedTime = parseDeferredTime(
param.expression.slice(getTriggerParametersStart(param.expression)),
);
if (parsedTime === null) {
throw new Error(`Could not parse time value of parameter "after"`);
}
afterTime = parsedTime;
} else if (MINIMUM_PARAMETER_PATTERN.test(param.expression)) {
if (minimumTime != null) {
throw new Error(`@loading block can only have one "minimum" parameter`);
}
const parsedTime = parseDeferredTime(
param.expression.slice(getTriggerParametersStart(param.expression)),
);
if (parsedTime === null) {
throw new Error(`Could not parse time value of parameter "minimum"`);
}
minimumTime = parsedTime;
} else {
throw new Error(`Unrecognized parameter in @loading block: "${param.expression}"`);
}
}
return new t.DeferredBlockLoading(
html.visitAll(visitor, ast.children, ast.children),View on GitHub (pinned to 51cb07e980)
Solutions
- Delete the duplicate and keep one `minimum` parameter
- If you intended two timings, use the valid combination `after <time>; minimum <time>`
Example fix
// before
@loading (minimum 1s; minimum 2s) {
Loading...
}
// after
@loading (minimum 2s) {
Loading...
} Defensive patterns
Strategy: validation
Validate before calling
function validateLoadingParams(params: string[]): string | null {
const minCount = params.filter((p) => /^minimum\s/.test(p)).length;
return minCount > 1 ? 'Duplicate "minimum" parameter in @loading' : null;
} Prevention
- @loading takes at most one minimum and one after parameter.
- Lint duplicated defer parameters in code review when templates are merged.
When it happens
Trigger: `@loading (minimum 1s; minimum 2s) {...}` — two parameters matching /^minimum\s/ in the same @loading block (parameters separated by `;`).
Common situations: Duplicating a parameter while copy-pasting timing configuration, or merging templates after a refactor. Developers sometimes add a second `minimum` intending to change the value instead of editing the first one.
Related errors
- @loading block can only have one "after" parameter
- Unrecognized parameter in @loading block: "${param.expressio
- Unrecognized parameter in @placeholder block: "${param.expre
- Could not parse time value of parameter "after"
- @error block cannot have parameters
AI-assisted analysis of angular/angular@51cb07e980 (2026-08-22).
Data as JSON: /api/errors/400a30c3d5f8bd9c.
Report an issue: GitHub.