【发布时间】:2021-05-17 00:36:29
【问题描述】:
所以我对使用 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' }
]);
}
}
提前致谢;)
【问题讨论】:
标签: typescript webpack aurelia