当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript FormBuilder.group方法代码示例

本文整理汇总了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]
     })
   });
 }
开发者ID:ismael8000,项目名称:classe_formBuilder_Angular2,代码行数:9,代码来源:app.ts

示例2: constructor

    constructor(fb: FormBuilder) {
        this.heading = "Enter a different value";
        this.myForm = fb.group({
            "heading": [this.heading]
        });

    }
开发者ID:Selim6422,项目名称:house,代码行数:7,代码来源:app.ts

示例3: constructor

	constructor(formBuilder: FormBuilder) {
		this.form = formBuilder.group({
			name: ["", Validators.required],
			priority: [0]
		});	

		this.todoList = new TodoList();
	};
开发者ID:tanou73,项目名称:Angular2POC,代码行数:8,代码来源:app.ts

示例4: m

 set m(t: Task) {
   this.task = t;
   this.form = this.fb.group({
     text: [t.text],
     up: [t.up],
     down: [t.down]
   });
 }
开发者ID:jimitndiaye,项目名称:HabiticaClient,代码行数:8,代码来源:cmp.ts

示例5: constructor

	constructor(builder: FormBuilder) {
		this.form = builder.group({
			firstName  : [""],    //Validators.required is not present in angular2/angular2
			middleName : [""],
			lastName   : [""],
			designation: [""]
		});
	}
开发者ID:sskelkar,项目名称:mis-employee-information,代码行数:8,代码来源:employee-information.ts

示例6: constructor

	constructor(builder: FormBuilder) {
		this.amountControl = new Control()
		
		this.peopleCountForm = builder.group({
			"amount": this.amountControl
		});
		
		this.ttAmountChange = new EventEmitter();
	}
开发者ID:Floryzzz,项目名称:tourists-on-a-trip,代码行数:9,代码来源:people-count.ts

示例7: constructor

  constructor(service: StocksService) {
    this.service = service;
    this.symbols = service.get();

    let builder = new FormBuilder();
    this.stockForm = builder.group({
      stock: ['']
    })
  }
开发者ID:babuley,项目名称:hello-world,代码行数:9,代码来源:manage.ts

示例8: setUpgksitesForm

 private setUpgksitesForm(): void{
     var formBuilder = new FormBuilder();
     this.newgksites = formBuilder.group({
         name: ['', Validators.required],
         description: [''],
         location: ['', Validators.required],
         public: [false]
     });
 }
开发者ID:IDCOLL,项目名称:GeneratingAPP,代码行数:9,代码来源:gksitesForm.ts

示例9: constructor

  constructor(
    public formBuilder: FormBuilder,
    public todoService: TodoService) {

    this.todoForm = formBuilder.group({
      'todo': ['', Validators.required]
    });
    this.todoInput = this.todoForm.controls.todo;

  }
开发者ID:Anhmike,项目名称:angular2-examples,代码行数:10,代码来源:todo.ts


注:本文中的angular2/angular2.FormBuilder.group方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。