PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchAngular error NG0950 means code read a required component or directive input before Angular supplied its bound value. The usual fix is to move that read into a reactive context—such as a template, computed, or effect—or wait until ngOnInit or later.
What NG0950 means
Angular describes NG0950 as occurring when “A required input was accessed but no value was bound.” The error is about timing: the input is required, but the code tried to access it before Angular set the value. A common cause is reading it during class construction, before Angular has initialized the component’s inputs. Angular’s NG0950 reference documents the error and its remedies.
As an Amazon Associate I earn from qualifying purchases.
How to fix the error
Move the read to a context where Angular has supplied the input. Angular documents two main approaches; which fits depends on whether the value should be consumed reactively or used imperatively.
Read it reactively
Use the input in the template, or read it from a computed or effect. These contexts are appropriate when the work should track the input and respond to changes.
#1 Best Overall
import { Component, computed, input } from '@angular/core';
@Component({
selector: 'app-summary',
template: '<p>{{ label() }}</p>'
})
export class SummaryComponent {
label = input.required<string>();
upperLabel = computed(() => this.label().toUpperCase());
}
For a signal-based input, the signal is read by calling it: this.label(). Declaring it with input.required<T>() does not make a property-style read such as this.label the input value. See Angular’s input guide and input API reference.
Read it in ngOnInit or later
If the value is needed for imperative setup, defer the read to ngOnInit or a later lifecycle point. Angular states that inputs are guaranteed to be available in ngOnInit and afterwards.
Rank #2
import { Component, OnInit, input } from '@angular/core';
@Component({
selector: 'app-summary',
template: ''
})
export class SummaryComponent implements OnInit {
label = input.required<string>();
ngOnInit() {
console.log(this.label());
}
}
Find the early read and verify the binding
- Find the required input declaration and search for every place the input is read. A signal-based required input is declared with
input.required<T>(); a decorator-based required input can use@Input({ required: true }). - Check whether any read occurs during field initialization, constructor execution, or another point before Angular sets the bound value. Move that work to a reactive context or to
ngOnInitor later. - Check the parent template where the component or directive is used. A required input must be supplied there; Angular reports an omitted required input as a build-time error. The build-time missing-binding check is distinct from NG0950, which concerns reading the input too early. See the Angular input guide.
Should you make the input optional?
Not just to suppress NG0950. If the parent is required to provide the value, keep the required contract and fix the timing of the read. If the value is legitimately optional, model it as optional instead. Angular’s documented remedy for NG0950 is to change when the input is accessed, not to weaken requiredness.
Recommended Free Tools
Quick Recap
Rank #4
Rank #3
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




