Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于menu菜单的ExpressionChangedAfterItHasBeenCheckedError问题 #13

Closed
jsercao opened this issue Sep 18, 2017 · 1 comment
Closed

Comments

@jsercao
Copy link

jsercao commented Sep 18, 2017

首先感谢ng-alain的实例哦,可以学到以及借鉴不少东西。

关于菜单,目前是配置在app-data.json中获取,但是当调整了比如:

{
        "text": "主导航",
        "translate": "main_navigation",
        "group": true,
        "children": [
            {
            "text": "小部件",
        },
            {
            "text": "仪表盘"
        } ]
    }

调整了小部件和仪表盘的菜单顺序后,再次加载后console中就会出现一些报错:

ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'null'. Current value: '24'.
    at viewDebugError (core.es5.js:8434)
    at expressionChangedAfterItHasBeenCheckedError (core.es5.js:8412)
    at checkBindingNoChanges (core.es5.js:8576)
    at checkNoChangesNodeInline (core.es5.js:12456)
    at checkNoChangesNode (core.es5.js:12422)
    at debugCheckNoChangesNode (core.es5.js:13202)
    at debugCheckRenderNodeFn (core.es5.js:13142)
    at Object.eval [as updateRenderer] (SidebarComponent.html:38)
    at Object.debugUpdateRenderer [as updateRenderer] (core.es5.js:13124)
    at checkNoChangesView (core.es5.js:12244)
@cipchk
Copy link
Member

cipchk commented Sep 18, 2017

我也遇到过,但是在生产环境下这个错误又不出现了。

但不确定这是 ng-alain 代码问题,还是 nz-menu 问题,这个问题暂时也没找不到有效的根源在哪。

cipchk added a commit that referenced this issue Sep 29, 2017
@cipchk cipchk closed this as completed in ad7f98d Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants