Angular 2 error- There is no directive with “exportAs” set to “ngModel” with RC4 version
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using angular 2 forms in my application and i have created the forms based on given link. https://angular.io/docs/ts/latest/guide/forms.html In this for validation and to use forms APIs, i have set the ngModel values like #name="id" #id="ngModel" and which throws script error. But its resolved if i set #id="ngModel" as #id="ngForm" . But for my case i have to set my model value to ngModel . Below is my html page. <form (ngSubmit)="onSubmit()" #myForm="ngForm"> <div class="form-group"> <label class="control-label" for="id">Employee ID<