Is directive that tells Angular to do two-way data binding. It works together with input
,
select
, textarea
. You can easily write your own directives to use ng-model
as well.
ng-model
is responsible for:
input
, textarea
or select
require,ng-valid
, ng-invalid
, ng-dirty
, ng-pristine
),form
.For basic examples, how to use ng-model
, see:
<input ng-model> ... </input>
<input class="ng-model"> ... </input>