angular
ExpressionChangedAfterItHasBeenCheckedError (NG0100)
NG0100.*Expression has changed after it was checked
Fixes
- 1.Move the value change to ngAfterViewInit with a ChangeDetectorRef.detectChanges() call
- 2.Use setTimeout(() => { ... }) to defer the change to the next cycle
- 3.Restructure to avoid changing parent-bound values in child lifecycle hooks — use OnPush + markForCheck()
change-detectionlifecycleruntime-error
Related Errors
angular3 fixes
Circular dependency in DI (NG0200)
NG0200.*Circular dependency in DI detected
- •Break the cycle by injecting one service lazily with `@Inject(forwardRef(() => ServiceName))`
- •Extract shared logic into a third service that both services depend on
angular3 fixes
NullInjectorError — missing provider
NullInjectorError: No provider for (\w+)
- •Add the service to the `providers` array of the module or component that needs it
- •Use `@Injectable({ providedIn: 'root' })` on the service class for app-wide singleton
angular3 fixes
Can't bind to property — not a known property (NG0303)
NG0303.*Can't bind to '.+' since it isn't a known property
- •Import the module that declares the directive/component (e.g., FormsModule for ngModel, ReactiveFormsModule for formControl)
- •Check for typos in the property name or directive selector