作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我随机开始收到此错误 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');
});
buy
redirect: function() {
this.transitionTo('buy');
}
rent
路由也呈现
buy
模板
renderTemplate: function() {
this.render('buy');
}
rent
或
index
模板。
最佳答案
我想通了为什么,原来我的模板上有两个具有相同 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/
我是一名优秀的程序员,十分优秀!