本文整理汇总了TypeScript中@angular/forms.FormGroup类的典型用法代码示例。如果您正苦于以下问题:TypeScript FormGroup类的具体用法?TypeScript FormGroup怎么用?TypeScript FormGroup使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FormGroup类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: it
it('should return null when path is empty', () => {
const g = new FormGroup({});
expect(g.get([])).toEqual(null);
});
开发者ID:robwormald,项目名称:angular,代码行数:4,代码来源:form_array_spec.ts
示例2: isTouched
public isTouched(): boolean {
return this.formGroup.get(this.controlName).touched;
}
开发者ID:davsuapas,项目名称:Angular2Ionic2ReusableApplications,代码行数:3,代码来源:edition-error-message.component.ts
示例3: hasError
public hasError(): boolean {
return this.formGroup.hasError(this.validationName, [this.controlName]);
}
开发者ID:davsuapas,项目名称:Angular2Ionic2ReusableApplications,代码行数:3,代码来源:edition-error-message.component.ts
示例4: onPlusButton
/**
* Opens the create form.
*/
public onPlusButton(): void {
if (!this.projectorToCreate) {
this.projectorToCreate = new Projector();
this.createForm.setValue({ name: '' });
}
}
开发者ID:CatoTH,项目名称:OpenSlides,代码行数:9,代码来源:projector-list.component.ts
示例5:
const paramedic = this.paramedics.filter(paramedic => paramedic._id === this.formEmergency.get('driver').value);
开发者ID:manuelao-s4ds,项目名称:Emergencies-ui,代码行数:1,代码来源:emergency.component.ts
示例6: dirtyDescription
/**
* @returns true if the description on the form differs from the poll's description
*/
public get dirtyDescription(): boolean {
return this.descriptionForm.get('description').value !== this.poll.description;
}
开发者ID:tsiegleauq,项目名称:OpenSlides,代码行数:6,代码来源:assignment-poll.component.ts
示例7: goBack
public goBack(): void {
this.passwordForm.reset();
this.location.back();
}
开发者ID:cinovo,项目名称:cloudconductor-server,代码行数:4,代码来源:usersettings.comp.ts
示例8: search
/**
* Handler for the search bar
*/
public search(): void {
const query = this.searchform.get('query').value;
this.searchform.reset();
this.router.navigate(['/search'], { queryParams: { query: query } });
}
开发者ID:tsiegleauq,项目名称:OpenSlides,代码行数:8,代码来源:site.component.ts
示例9: onEditDescriptionButton
/**
* Sends the edited poll description to the server
* TODO: Better feedback
*/
public async onEditDescriptionButton(): Promise<void> {
const desc: string = this.descriptionForm.get('description').value;
await this.assignmentRepo.updatePoll({ description: desc }, this.poll).then(null, this.raiseError);
}
开发者ID:tsiegleauq,项目名称:OpenSlides,代码行数:8,代码来源:assignment-poll.component.ts
注:本文中的@angular/forms.FormGroup类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论