getlantern/lantern — comment on commit f949df31c4426828f5021178ab7fb95720a19808
File:  line 0
By forkner:

Hmm not exactly sure what you were running into here, but based on some similar issues. I can't completely explain it... I find it pretty subtle and hard to reason about.

My theory is that the issue here is tying state.email and pmfromemail together via a value="{{state.email}}" field in the template. I *think* this is not quite right because the value="{{..}}" is only truly filled in as a result of completing the re-evaluation of the template -- (ie post $digest).

I believe you get what you want if you do a self.$watch on state.email that sets self.pmfromemail = state.email. This will execute during $digest (and watches keep executing until everything settles down)

ie ditch value="{{state.email}}" and in dashboard do a

```
self.$watch("state.email", function(scope, newVal, oldVal) {
self.pmfromemail = self.state.email;
});
```