search

Home  >  Q&A  >  body text

javascript - the most basic form validation in angular

In angular, ng-controller will form a scope. When using the form form, it will form a scope of the formController. When using ng-model, it will form a scope of the controllerScope. I want to ask Take a look, the instruction is require: 'ngModel', is the scope of the fourth parameter of link only the input scope? Search upward, or search the scope formed by the ng-model bound to the form in the parent scope?

给我你的怀抱给我你的怀抱2738 days ago800

reply all(1)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-06-29 10:11:31

    It’s a bit messy. . . Just get the value in the ng-controller scope, don’t worry about the formController

    reply
    0
  • Cancelreply