本文整理汇总了TypeScript中@angular/forms.FormGroup.markAsPending方法的典型用法代码示例。如果您正苦于以下问题:TypeScript FormGroup.markAsPending方法的具体用法?TypeScript FormGroup.markAsPending怎么用?TypeScript FormGroup.markAsPending使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@angular/forms.FormGroup
的用法示例。
在下文中一共展示了FormGroup.markAsPending方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: init
init(provider: MealProvider, wizard: Wizard) {
this.provider = provider;
this.wizard = wizard;
// Update validity state so that Next button is available
// don't mix the order of markAsPending and updateValueAndValidity
// otherwise ExpressionChangedAfterItHasBeenCheckedException is thrown
// this.group.updateValueAndValidity();
// Mark as pending to prevent devmode check fail that isValid() changed while rendering - caused by async validator
this.group.markAsPending();
}
示例2: ngOnChanges
ngOnChanges(changes: {[propName: string]: SimpleChange}) {
if (this.providerHolder && changes['provider']) {
this.providerHolder.data = changes['provider'].currentValue;
this.group.markAsPending();
}
}
示例3: onSubmit
onSubmit(): void {
this.form.markAsPending();
}