gpt4 book ai didi

javascript - Uncaught Error : Assertion Failed: Attempted to register a view with an id already in use: name

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

我随机开始收到此错误 Uncaught Error: Assertion Failed: Attempted to register a view with an id already in use: name在我的应用程序上使用 ember-cli。
我只有两条路线

Router.map(function() {
this.route('buy');
this.route('rent');
});

没有 Controller ,我的索引路由将我重定向到 buy
redirect: function() {
this.transitionTo('buy');
}

和我的 rent路由也呈现 buy模板
renderTemplate: function() {
this.render('buy');
}

我没有 rentindex模板。
我不知道这个错误是从哪里来的。

最佳答案

我想通了为什么,原来我的模板上有两个具有相同 ID 的输入,{{ input name="name" id="name" placeholder="Full Name" class="full-width" }}在不同的地方两次。如果错误消息可以提供更多信息并在实际代码中为您提供一行而不是仅显示行 throw new EmberError("Assertion Failed: " + desc);,那将会很有用。关于你 vendor.js文件。

关于javascript - Uncaught Error : Assertion Failed: Attempted to register a view with an id already in use: name,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27029299/

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