You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately when I try to edit an existing exercise it cant load that in exercise template page, but after I editing code such as it return the promise and resolving the promise in init() function solve my problem. I think the code here really needs modification:
var init = function () {
// We do not use the resolve property on the route to load exercise as we do it with workout.
$scope.exercise = ExerciseBuilderService.startBuilding($routeParams.id);
};
And Here:
service.startBuilding = function (name) {
//We are going to edit an existing exercise
if (name) {
buildingExercise = WorkoutService.Exercises.get({ id: name }, function (data) {
newExercise = false;
});
}
else {
buildingExercise = new Exercise({});
newExercise = true;
}
return buildingExercise;
};
we should consider using $promise and using it after resolution at init() function using then call back Function
The text was updated successfully, but these errors were encountered:
Altough due to this point that both of $scope.exercise and buildingExercise refrence to same object I think the above code is correct altough it doesnt refresh the template for me. What is the mechanism of dirty watch here? does every change to building exercise trigger digest cycle or the change should directly do at property level of $scope.exercise?
Thanks in advance
Unfortunately when I try to edit an existing exercise it cant load that in exercise template page, but after I editing code such as it return the promise and resolving the promise in init() function solve my problem. I think the code here really needs modification:
And Here:
we should consider using
$promise
and using it after resolution atinit()
function usingthen
call back FunctionThe text was updated successfully, but these errors were encountered: