javascript - angularjs custom $error
PHPz
PHPz 2017-05-19 10:14:30
0
1
512

I want to customize the request $error, and return the name of $error according to the interface request to determine the corresponding prompt for ng-show prompts to the user:
For example: regForm.$error.isWrong

PHPz
PHPz

学习是最好的投资!

reply all(1)
習慣沉默

I don’t understand why $error needs to be redefined.
Wouldn’t it be better if you process the $error returned by the interface, convert it into the desired format, and then implement two-way binding on the page?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!