ng-model will auto-create scope variables if they don't exist. That's a handy shortcut.
But if you have two inputs that can auto-create variable you're asking for trouble, and you should probably initialize it on the scope constructor.
Or at the very least, use an ng-init so that you know where it will be created.
ng-model will auto-create scope variables if they don't exist. That's a handy shortcut.
But if you have two inputs that can auto-create variable you're asking for trouble, and you should probably initialize it on the scope constructor.
Or at the very least, use an ng-init so that you know where it will be created.