Skip to content
This repository

ngModelController looses scope binding when using primitives in isolated scope #1913

richidd opened this Issue · 3 comments

2 participants

Richi Pete Bacon Darwin

I was about to write a pulldown menu directive and came across with the following issue that i posted to stackoverflow.

When you use an isolated scope in a directive and pass a primitiv value to ngModel the controller will not write the data back to the parent scope + the view(of course)

the stackoverflow entry has js fiddles:

Pete Bacon Darwin

This is just the way javascript prototypical inheritance works: see
Closing this one for now. If you feel there is more to be discussed then reopen with further issues.


Shouldn't the framwork somehow be able to handle that. For example somehow transform that input into an object. It is going throu an eval anyways. In the discribed case this behavior seems like a bug to me. Frameworks should work as expected. There should be no need to know about the whole complex background. Eventhough after reading the linked content, its quite clear what happened.

Pete Bacon Darwin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.