| Start | ||||
|---|---|---|---|---|
| get/set formBuilder controls parameters There are 2 ways to set formBuilder controls parameters.
2.After initialize: Get formBuilder control value: |
||||
| Custom validator examples: Angular 2 has two kinds of custom validators. Synchronous validators as in the first example that will run directly on the client and asynchronous validators (the second example) that you can use to call a remote service to do the validation for you. In this example the validator should call the server to see if a value is unique. If your control value is valid you simply return null to the caller. Otherwise you can return an object which describes the error. |
||||
Using validators in the Formbuilder Here we use the FormBuilder to create a very basic form with two input boxes. The FromBuilder takes an array for three arguments for each input control.
Parameters
|
Read Article
https://develop.horje.com/learn/1434/reference