I\'m having trouble understanding/using the scopes for an angular UI modal.
While not immediately apparent here, I have the modules and everything set up correctly
When nested scopes are involved, do not bind s directly to members of the scope:
Bind them to at least a level deeper:
The reason is that scopes prototypically inherit their parent scope. So when setting 1st level members, these are set directly on the child scope, without affecting the parent. In contrast to that, when binding to nested fields (form.name
) the member form
is read from the parent scope, so accessing the name
property accesses the correct target.
Read a more detailed description here.