Answer the question
In order to leave comments, you need to log in
Why doesn't angularJs update the template after parent's params change from child event?
I found a curious test for the first angular. At the final stage, I ran into the problem of updating the template.
I tried everything - the angular does not want to in any way. I am not familiar with 1st angular, so I do it naturally, according to the dock, and based on the experience of vue.
Problem areas commented out
Answer the question
In order to leave comments, you need to log in
You forgot the link to the controller:
<div>
Status: {{status ? status : "Waiting..."}}<br>
Finished: {{myCtrl.finished}}
</div>
finished
in scope
instead of the controller:$scope.$on('on-finish', (event, endTime, id) => {
// колбэк отрабатывает, но finished в шаблоне не обновляется
$scope.$endTime = endTime;
$scope.finished = status = 'Timer ' + id + ' finished at ' + endTime;
alert(this.finished);
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question