我正在尝试创建我的角度5应用程序的构建,但它显示以下错误
模板编译时不支持“AppModule表达式”。
我正在使用reg表达式为路由创建动态路径。以下是app.module中导致上述错误的代码。
{
matcher: ComplexUrlMatcher("luxury-cruises/x-to-x-x", /^luxury-cruises\/[a-zA-Z-]+-to-[a-zA-Z-]+-[0-9-]+$/),
component: RcycVoyagesComponent
},
{
matcher: ComplexUrlMatcher("luxury-x-cruises", /^luxury-[a-zA-Z-]+-cruises$/),
component: RcycRegionComponent
},
{
matcher: ComplexUrlMatcher("luxury-x-cruises/cruises-from-x-x", /^luxury-[a-zA-Z-]+-cruises\/cruises-from-[a-zA-Z-]+-[a-zA-Z-]+$/),
component: RcycPortsComponent
},
{
matcher: ComplexUrlMatcher("luxury-x-cruises/cruises-from-x-x/porttabs", /^luxury-[a-zA-Z-]+-cruises\/cruises-from-[a-zA-Z-]+-[a-zA-Z-]+\/[a-zA-Z-]+$/),
component: RcycPortsComponent
},
{
matcher: ComplexUrlMatcher("experience/suites/porttabs", /experience\/suites\/[a-zA-Z-]+$/),
component: RcycSuitesComponent
},
我该如何解决这个问题?