4 ms·
I don't think that's even a scope issue... ng-model will auto-create scope variables if they don't exist. That's a handy shortcut. But if you have two inputs
by wmil 12y ago
I don't think that's even a scope issue...
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.