xtform
xtform copied to clipboard
xtForm and UI Bootstrap $apply already in progress
When you try to run UI bootstrap popup datepicker (https://angular-ui.github.io/bootstrap/) inside xtForm form it will result in the following error:
Error: [$rootScope:inprog] $apply already in progress
http://errors.angularjs.org/1.3.15/$rootScope/inprog?p0=%24apply
at REGEX_STRING_REGEXP (angular.js:63)
at beginPhase (angular.js:14820)
at Scope.$get.Scope.$apply (angular.js:14564)
at HTMLInputElement.
@vlasenko Could you replicate that in http://plnkr.co/ ?
I was able to reproduce this problem in Chrome + Angular 1.3, Angular ui 0.13.3 + xtform. Not sure if this was a xtform problem but could be due to Angular ui 0.13.3. A previous version of angular ui did not have this problem.
Eitherway, due to complexity and performance i noted in Angular ui datepicker, I am moving on to AngularStrap.
@vlasenko I was running into the same issue. Changing the xtForm.js line 58 do the trick for me: scope.$apply() => scope.$evalAsync()
$evalAsync takes a function and schedules it to run later but still during the ongoing digest. Also $evalAsync triggers a digest when there is no one is running.