gpt4 book ai didi

Ember.js 不清楚错误信息 : "TypeError: can' t redefine non-configurable property '__ember1346625712617' "

转载 作者:行者123 更新时间:2023-12-02 06:06:03 25 4
gpt4 key购买 nike

我怀疑这个问题可能与我的路由或我的观点有关。这里有两个:

App.router = Ember.Router.create({
enableLogging: true,
location: 'history',
root: Ember.Route.extend({
index: Ember.Route.extend({
route: '/admin/',
redirectsTo: 'login'
}),
login: Ember.Route.extend({
route: '/admin/login/',
doLogin: function(router, context) {
"use strict";
router.transitionTo('dashboard', context);
},
connectOutlets: function (router, context) {
"use strict";
router.get('applicationController').connectOutlet('login', "login");
}
}),
dashboard: Ember.Route.extend({
route: '/admin/dashboard/',
doLogout: function(router, context) {
"use strict";
router.transitionTo('login', context);
},
connectOutlets: function (router, context) {
"use strict";
router.get('applicationController').connectOutlet('sidebar', 'sidebar');
router.get('applicationController').connectOutlet('toolbar', 'toolbar');
router.get('applicationController').connectOutlet('dashboard', 'dashboard');
}
}),
articles: Ember.Route.extend({
route: '/admin/articles/',
connectOutlets: function (router, context) {
"use strict";
console.log("here");
router.get('applicationController').connectOutlet('sidebar', 'sidebar');
router.get('applicationController').connectOutlet('toolbar', 'toolbar');
router.get('applicationController').connectOutlet('articles', 'articles');
}
})
})
});

我的观点有问题:
<script type="text/x-handlebars" data-template-name="sidebar">
<div class="logo">
<img src="http://boxed.hu/static/boxed.hu/images/sitebuild/logo.png">
</div>
<ul>
<li>
<a id="dashboardMenu" href="" data-module="dashboard" class="selected" {{action dashboard}}>
Dashboard
<span class="icon-home"></span>
</a>
</li>
<li>
<a id="articlesMenu" href="" data-module="articles" class="" {{action articles}}>
Articles
<span class="icon-copy"></span>
</a>
</li>
<li>
<a id="mediaMenu" href="" data-module="media" class="" {{action media}}>
Media
<span class="icon-picture"></span>
</a>
</li>
<li>
<a id="pagesMenu" href="" data-module="pages" class="" {{action pages}}>
Pages
<span class="icon-file"></span>
</a>
</li>
<li>
<a id="commentsMenu" href="" data-module="comments" class="" {{action comments}}>
Comments
<span class="icon-comments"></span>
</a>
</li>
<li>
<a id="usersMenu" href="" data-module="users" class="" {{action users}}>
Users
<span class="icon-user"></span>
</a>
</li>
<li>
<a id="rolesMenu" href="" data-module="roles" class="" {{action roles}}>
Roles
<span class="icon-unlock"></span>
</a>
</li>
</ul>
</script>

当我单击列表中的元素之一时,会得到以下控制台输出:
STATEMANAGER: Sending event 'articles' to state root.

TypeError: can't redefine non-configurable property '__ember1346625712617'
[Break On This Error]

o_defineProperty(this, GUID_KEY, undefinedDescriptor);

我打算调试代码,但我认为这里的帖子可能会比我的调试带来更快的答案。

最佳答案

这不是具体的 Ember 错误,而是浏览器错误:Error in accessor property: can't redefine non-configurable property 'status' .

我怀疑您将其视为将操作( {{action articles}} )命名为与状态相同的结果。

关于Ember.js 不清楚错误信息 : "TypeError: can' t redefine non-configurable property '__ember1346625712617' ",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12240637/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com