Closed rdzidziguri closed 7 years ago
Creating property inside vm would be another option but in this case each step has to implement logic to set value for this step. this would work but architecturally this is not the right way do achieve what i want so is there any better way we could achieve this?
I think all is needed to achieve this is to pass this function step item.
newStepElement.then(function (step) {
onStepChange(step);
currentStepScope = step.scope;
currentStepElement = step.element;
currentStepElement.scrollTop = 0;
stepContainer.scrollTop = 0;
currentEnterAnimation = $animate.enter(currentStepElement, stepContainer);
}, function () {
throw new Error('Could not load step ' + step);
});
on-step-change="vm.onStepChange()" this is my of form and in a parent controller i get this method invoked whenever step changes, but the problem is that it does not take any parameters and in a parent controller (view of this controller includes directive for multi step form). there is not way to learn on which step form is currently on. is there any way i can access this information in the parent controller? maybe method could take argument which includes curent step next step and previews step as a argument object values?