當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。