-
-
Notifications
You must be signed in to change notification settings - Fork 401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$watch of nested directive is not triggered when form's onaftersave get called #764
Comments
Currently I have to use $timeout with 1 second delay in |
Maybe use |
I took a look at this and didn't see anything obvious.
Couldn't find anything else that worked. |
I guess the problem occurs in step 3. |
For someone meets the same problem, here's what I'm doing now as a workaround:
By using this approach, you don't need to change the form's |
I'm trying to create a duration editor which could represent "x days x hours x minutes x seconds" for a number which stores total seconds.
So the model
totalSeconds
is a number, and I create objectduration
of class Duration in the directive, then use 4 editable-text for those 4 properties.In link method of the directive, I create
scope.duration
model and watch the objectduration
, the callback recalculates and updates the binding modeltotalSeconds
.When saving,
duration.days
gets called firstduration
(orduration.days
) gets calledSo I'm not able to save the updated
totalSeconds
in step 2.Is there a way to let step 3 done before step 2?
The text was updated successfully, but these errors were encountered: