Angular 4 Template-Forms multi-field validation directive and ngModelGroup

浪尽此生 提交于 2019-12-04 19:48:01

In your code you have:

<input #newPasswd="ngModel" ... [(ngModel)]="newPassword" >

I noticed @18:13 in Kara's video it looked like this:
<input ngModel name="password" ... #password="ngModel">

Try changing your code in both places to this syntax/sequence see if that fixes it.

Hint: It's because newPasswd is what directive would need surely with your syntax.
You are using newPassword from name, not the # Angular template variable.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!