我正在使用 Angular 2 的 ES5 风格。
我遇到了这个错误:
Unhandled Promise rejection: Template parse errors:
More than one component matched on this element.
Make sure that only one component's selector can match a given element.
Conflicting components: class2,class6 ("
</tbody>
</table>
[ERROR ->]<paging [data]="data" (changed)="loadCountries($event)" unit="country"></paging>
<md-spinner class="lis"): class18@30:0 ; Zone: <root> ; Task: Promise.then ; Value:
It says class2
and class6
。我找不到课程的原始名称。
这是我的模块定义:
var module = ng.core.NgModule({
imports: [
ng.platformBrowser.BrowserModule,
ng.router.RouterModule.forRoot([].concat([...])),
ng.material.MaterialModule,
ng.http.HttpModule,
ng.common.CommonModule,
ng.forms.FormsModule],
declarations: [
app.CoalAddWorldCoalSupply,
app.FilterValuesDialog,
app.CoalFlows,
app.ImportWorldCoalSupplies,
app.CoalProducts,
app.CoalReports,
app.CoalUpsertFlow,
app.CoalUpsertProduct,
app.CoalWorldCoalSupplies,
app.CountryList,
app.CountryUpsert,
app.Dashboard,
app.ElectricityHeatGenerations,
...
],
entryComponents: [app.FilterValuesDialog, confirmDialog],
bootstrap: [app.Layout],
providers: [globalService]
})
.Class({
constructor: function () { }
});
document.addEventListener('DOMContentLoaded', function () {
ng.platformBrowserDynamic
.platformBrowserDynamic()
.bootstrapModule(module);
});
指定的零件...
意味着更多相同的事情。
如何理解是哪个类zone.js
指的是?