MCPcopy Create free account
hub / github.com/angular/angular / checkParentType

Function checkParentType

packages/forms/src/directives/ng_model.ts:443–449  ·  view source on GitHub ↗
(parent: ControlContainer | null)

Source from the content-addressed store, hash-verified

441}
442
443function checkParentType(parent: ControlContainer | null) {
444 if (!(parent instanceof NgModelGroup) && parent instanceof AbstractFormGroupDirective) {
445 throw formGroupNameException();
446 } else if (!(parent instanceof NgModelGroup) && !(parent instanceof NgForm)) {
447 throw modelParentException();
448 }
449}

Callers 1

_checkForErrorsMethod · 0.70

Calls 2

formGroupNameExceptionFunction · 0.90
modelParentExceptionFunction · 0.90

Tested by

no test coverage detected