我有一个指令,它是KendoUI kendo-tooltip的包装器,我实例化它是这样的:
<div my-directive-popover="options">
</div>
在我的代码中,我用kendo-tooltip替换my-directive-popover,如下所示:
$element.attr( 'kendo-tooltip', popoverName );
在预编译功能结束时,我必须编译它,以便它被认为是另一个kendo指令:
$compile( element )( $scope );
Kendo 2014.2.903工作得很好,但是最新的Kendo 2015.1.429我得到以下错误:
Error: [$rootScope:inprog] $digest already in progress
http://errors.angularjs.org/1.2.28/$rootScope/inprog?p0=%24digest
at VALIDITY_STATE_PROPERTY (angular-1.2.28.js:78)
at beginPhase (angular-1.2.28.js:13122)
at Scope.$get.Scope.$apply (angular-1.2.28.js:12908)
at bindToKNgModel (all.min.2015.1.429.js:113036)
at createIt (all.min.2015.1.429.js:112869)
at createWidget (all.min.2015.1.429.js:112754)
at all.min.2015.1.429.js:113257
at $timeout (all.min.2015.1.429.js:112653)
at module.factory.create.link (all.min.2015.1.429.js:113253)
at nodeLinkFn (angular-1.2.28.js:6752)(anonymous function) @ angular-1.2.28.js:10126$get @ angular-1.2.28.js:7398$get.Scope.$apply @ angular-1.2.28.js:12911bindToKNgModel @ all.min.2015.1.429.js:113036createIt @ all.min.2015.1.429.js:112869createWidget @ all.min.2015.1.429.js:112754(anonymous function) @ all.min.2015.1.429.js:113257$timeout @ all.min.2015.1.429.js:112653module.factory.create.link @ all.min.2015.1.429.js:113253nodeLinkFn @ angular-1.2.28.js:6752compositeLinkFn @ angular-1.2.28.js:6146nodeLinkFn @ angular-1.2.28.js:6746compositeLinkFn @ angular-1.2.28.js:6146nodeLinkFn @ angular-1.2.28.js:6746compositeLinkFn @ angular-1.2.28.js:6146compositeLinkFn @ angular-1.2.28.js:6149publicLinkFn @ angular-1.2.28.js:6042$get.boundTranscludeFn @ angular-1.2.28.js:6166controllersBoundTransclude @ angular-1.2.28.js:6773ngRepeatAction @ angular-1.2.28.js:20750$watchCollectionAction @ angular-1.2.28.js:12519$get.Scope.$digest @ angular-1.2.28.js:12650digest @ all.min.2015.1.429.js:113429(anonymous function) @ all.min.2015.1.429.js:113551withoutTimeout @ all.min.2015.1.429.js:112654(anonymous function) @ all.min.2015.1.429.js:113513klass.(anonymous function) @ all.min.2015.1.429.js:113473kendo.ui.DataBoundWidget.extend._thead @ all.min.2015.1.429.js:59561kendo.ui.DataBoundWidget.extend.init @ all.min.2015.1.429.js:55028(anonymous function) @ all.min.2015.1.429.js:3013jQuery.extend.each @ require-jquery.js:2317jQuery.fn.jQuery.each @ require-jquery.js:2006extend.plugin.$.fn.(anonymous function) @ all.min.2015.1.429.js:3012createIt @ all.min.2015.1.429.js:112837createWidget @ all.min.2015.1.429.js:112754(anonymous function) @ all.min.2015.1.429.js:113257$timeout @ all.min.2015.1.429.js:112653module.factory.create.link @ all.min.2015.1.429.js:113253nodeLinkFn @ angular-1.2.28.js:6752compositeLinkFn @ angular-1.2.28.js:6146nodeLinkFn @ angular-1.2.28.js:6746compositeLinkFn @ angular-1.2.28.js:6146nodeLinkFn @ angular-1.2.28.js:6746compositeLinkFn @ angular-1.2.28.js:6146nodeLinkFn @ angular-1.2.28.js:6746compositeLinkFn @ angular-1.2.28.js:6146compositeLinkFn @ angular-1.2.28.js:6149compositeLinkFn @ angular-1.2.28.js:6149publicLinkFn @ angular-1.2.28.js:6042(anonymous function) @ all.min.2015.1.429.js:113549forEach @ angular-1.2.28.js:325(anonymous function) @ all.min.2015.1.429.js:113534withoutTimeout @ all.min.2015.1.429.js:112654(anonymous function) @ all.min.2015.1.429.js:113513klass.(anonymous function) @ all.min.2015.1.429.js:113473Widget.extend._appendContent @ all.min.2015.1.429.js:31457Widget.extend._show @ all.min.2015.1.429.js:31526Widget.extend.show @ all.min.2015.1.429.js:31509kendo.ui.Tooltip.render @ kendo-fixes.js:15(anonymous function) @ nmsweb-popover.js:255$get.Scope.$emit @ angular-1.2.28.js:13028createIt @ all.min.2015.1.429.js:112841createWidget @ all.min.2015.1.429.js:112754(anonymous function) @ all.min.2015.1.429.js:113257(anonymous function) @ angular-1.2.28.js:14417completeOutstandingRequest @ angular-1.2.28.js:4411(anonymous function) @ angular-1.2.28.js:4725
答案 0 :(得分:0)
kendoui-popover不是问题。问题是不需要的范围。$ apply kendo在小部件中执行。他们将在最新版本中删除它:
他们今天承诺修复: