Utilizing Angular 2 and Typescript, I have a component with a property defined as follows:
alias: string;
Attempting to bind this property to an input tag in my template like so:
<input class="form-control" type="text" required
[(ngModel)]="alias" ngControl="alias" #alias="ngForm" />
Upon executing this code, an error is thrown stating:
angular2.dev.js:23925 EXCEPTION: Error: Uncaught (in promise): Cannot reassign a variable binding alias
If I change the property name from 'alias' to 'nameOrAlias', everything functions as expected without any errors. Why is this happening?