* @description * Method that sets up the control directive in this group, re-calculates its value * and validity, and adds the instance to the internal list of directives. * * @param dir The `NgModel` directive instance.
(dir: NgModel)
| 225 | * @param dir The `NgModel` directive instance. |
| 226 | */ |
| 227 | addControl(dir: NgModel): void { |
| 228 | resolvedPromise.then(() => { |
| 229 | const container = this._findContainer(dir.path); |
| 230 | (dir as Writable<NgModel>).control = <FormControl>( |
| 231 | container.registerControl(dir.name, dir.control) |
| 232 | ); |
| 233 | dir._setupWithForm(this.callSetDisabledState); |
| 234 | dir.control.updateValueAndValidity({emitEvent: false}); |
| 235 | this._directives.add(dir); |
| 236 | }); |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * @description |
nothing calls this directly
no test coverage detected