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
varvalidityWatcher;// ...// in a setup fn:validityWatcher=$scope.$watch("ctrl.selectionForm.$valid",function(isValid){ctrl.steps[0].valid=isValid;});// ... // in another fn:if(validityWatcher){validityWatcher();validityWatcher=undefined;}// // in a cleanup fn:ctrl.$onDestroy=function(){if(validityWatcher){validityWatcher();validityWatcher=undefined;}// ...
There is a lot of bookkeeping involved for validation & it feels a bit out of sync with typical angular validation. The ideal option is to get it in the view, but a secondary option might be to get a validation function added to the steps & hide the setup/tear down code from the user (hide by adding an ng-form behind the scenes, perhaps w/a name = to the step.id or step.id+rand and then toggling its $valid property based on the validator fn).
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Original issue in origin-web-console.
The example in the original issue is this:
There is a lot of bookkeeping involved for validation & it feels a bit out of sync with typical angular validation. The ideal option is to get it in the view, but a secondary option might be to get a validation function added to the
steps
& hide the setup/tear down code from the user (hide by adding anng-form
behind the scenes, perhaps w/a name = to thestep.id
orstep.id+rand
and then toggling its$valid
property based on the validator fn).The text was updated successfully, but these errors were encountered: