angular - ReactiveFormsModule vs. FormsModule in Angular2 -


there exists reactiveformmodule , formmodule.

import {formsmodule, reactiveformsmodule} "@angular/forms"; 

when should use reactiveformmodule , provides module comparing formmodule.

formsmodule - angular 1 tackles forms via famous ng-model directive. angular 2 provides identical mechanism named ngmodel, allow build called template-driven forms.

unlike case of angularjs, ngmodel , other form-related directives not available default.

reactiveformsmodule model driven forms. each form has state can updated many different interactions , application developer manage state , prevent getting corrupted. can hard large forms , can introduce category of potential bugs.

where can write validations not in html. in case can attach many validations , wrap form.

i got here. there better explanation:


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -