Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: