Renderize os campos correspondentes:
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/**
* Advances to an element for later binding instructions.
*
* Used in conjunction with instructions like {@link property} to act on elements with specified
* indices, for example those created with {@link element} or {@link elementStart}.
*
* ```ts
* (rf: RenderFlags, ctx: any) => {
* if (rf & 1) {
* text(0, 'Hello');
* text(1, 'Goodbye')
* element(2, 'div');
* }
* if (rf & 2) {
* advance(2); // Advance twice to the <div>.
* property('title', 'test');
* }
* }
* ```
* @param delta Number of elements to advance forwards by.
*
* @codeGenApi
*/
function ɵɵadvance(delta) {
ngDevMode && assertGreaterThan(delta, 0, 'Can only advance forward');
selectIndexInternal(getTView(), getLView(), getSelectedIndex() + delta, getCheckNoChangesMode());
}
Execute o init e verifique o gancho:
Gancho de execução:
this.formDirective.addControl (this):
este 指向 FormContrlName:
O controle deliveryModeIdJerry não pode ser encontrado:
Então, finalmente, um erro:
Renomeie deliveryModeId para deliveryModeIdJerry aqui.
O problema é resolvido após a correção:
Para mais artigos originais de Jerry, siga a conta pública "Wang Zixi":