本文整理汇总了TypeScript中angular2/angular2.FormBuilder.group方法的典型用法代码示例。如果您正苦于以下问题:TypeScript FormBuilder.group方法的具体用法?TypeScript FormBuilder.group怎么用?TypeScript FormBuilder.group使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angular2/angular2.FormBuilder
的用法示例。
在下文中一共展示了FormBuilder.group方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: constructor
constructor(builder: FormBuilder) {
this.loginForm = builder.group({
login: ["", Validators.required],
passwordRetry: builder.group({
password: ["", Validators.required],
passwordConfirmation: ["", Validators.required]
})
});
}
示例2: constructor
constructor(fb: FormBuilder) {
this.heading = "Enter a different value";
this.myForm = fb.group({
"heading": [this.heading]
});
}
示例3: constructor
constructor(formBuilder: FormBuilder) {
this.form = formBuilder.group({
name: ["", Validators.required],
priority: [0]
});
this.todoList = new TodoList();
};
示例4: m
set m(t: Task) {
this.task = t;
this.form = this.fb.group({
text: [t.text],
up: [t.up],
down: [t.down]
});
}
示例5: constructor
constructor(builder: FormBuilder) {
this.form = builder.group({
firstName : [""], //Validators.required is not present in angular2/angular2
middleName : [""],
lastName : [""],
designation: [""]
});
}
示例6: constructor
constructor(builder: FormBuilder) {
this.amountControl = new Control()
this.peopleCountForm = builder.group({
"amount": this.amountControl
});
this.ttAmountChange = new EventEmitter();
}
示例7: constructor
constructor(service: StocksService) {
this.service = service;
this.symbols = service.get();
let builder = new FormBuilder();
this.stockForm = builder.group({
stock: ['']
})
}
示例8: setUpgksitesForm
private setUpgksitesForm(): void{
var formBuilder = new FormBuilder();
this.newgksites = formBuilder.group({
name: ['', Validators.required],
description: [''],
location: ['', Validators.required],
public: [false]
});
}
示例9: constructor
constructor(
public formBuilder: FormBuilder,
public todoService: TodoService) {
this.todoForm = formBuilder.group({
'todo': ['', Validators.required]
});
this.todoInput = this.todoForm.controls.todo;
}