在模拟编译“AppModule'”期间出错角度5中不支持表达形式

时间:2018-04-18 21:08:52

标签: angular5

当我尝试创建我的项目的构建时,它显示上面的错误。而不是指定路径我使用reg-expression作为我的app.module中的路由匹配器。

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
    },  

0 个答案:

没有答案