大佬教程收集整理的这篇文章主要介绍了在视图中使用 <form> 元素时出现 Aurelia Webpack 路由器错误,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
所以我对使用 Aurelia.io 还比较陌生,我偶然发现了一个错误。
由于我在我的应用程序中实现了一个路由器,一旦我在我的视图中定义了一个 <form>
元素,我就会在我的浏览器中收到以下错误代码:
ERROR [app-router] Error: Error invoking Form. Check the inner error for details.
------------------------------------------------
Inner Error:
Message: too much recursion
Inner Error Stack:
Container.prototype._get@webpack-internal:///3U8n:532:41
Container.prototype._get@webpack-internal:///3U8n:538:32
Container.prototype._get@webpack-internal:///3U8n:538:32
Container.prototype._get@webpack-internal:///3U8n:538:32
我的 Form.HTML 看起来像这样:
<div ID="formcontainer">
<form>
<!--Vorname-->
<div class="wrapper">
<div class="input-data">
<input type="text" value.bind="Applicant.name & valIDate" required>
<div class="underline"></div>
<label>name</label>
</div>
</div>
<!--Nachname-->
<div class="wrapper">
<div class="input-data">
<input type="text" required>
<div class="underline"></div>
<label>Family name</label>
</div>
</div>
</form>
</div>
没有 <form>
元素,一切正常。
Form.HTML 通过路由显示在我的 app.HTML 中:
<template>
<router-vIEw></router-vIEw>
</template>
我的带有路由器配置的 app.ts 如下所示:
export class App {
router: any;
configureRouter(config,router) {
this.router = router;
config.Title = 'Aurelia';
config.map([
{ route: ['','Form'],name: 'Form',moduleID: PLATFORM.modulename('Form/Form'),Title: 'ApplicationProcess' },{ route: 'Confirmation',name: 'Confirmation',moduleID: PLATFORM.modulename('Confirmation/Confirmation'),Title: 'Sending Confirmed' }
]);
}
}
提前致谢;)
我猜你的 Form.js 中有一些东西是由更改事件或加载的东西触发的。这通常不会导致错误。
你介意发布一个代码笔或我们可以摆脱的东西吗?
当一个 JS 函数被递归触发太多次时,就会发生太多的递归错误。
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Too_much_recursion
以上是大佬教程为你收集整理的在视图中使用 <form> 元素时出现 Aurelia Webpack 路由器错误全部内容,希望文章能够帮你解决在视图中使用 <form> 元素时出现 Aurelia Webpack 路由器错误所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。