Skip to content

ngc codegen quotes properties, which breaks closure compiler #11050

@alexeagle

Description

@alexeagle

Say I configure my routes with

export const routes: Routes = [
  {path: 'search', redirectTo: '/'}, {path: '', component: SearchVideos},
  {path: 'upload', component: UploadVideos}
];

ngc produces an ngfactory.ts containing:

  get _ROUTES_40():any[] {
      if ((this.__ROUTES_40 == (null as any))) { (this.__ROUTES_40 = [[
        {
          'path': 'search',
          'redirectTo': '/'
        }
        ,
        {
          'path': '',
          'component': import38.SearchVideos
        }
        ,
        {
          'path': 'upload',
          'component': import39.UploadVideos
        }

      ]
    ]); }
    return this.__ROUTES_40;
  }

note that redirectTo got quoted as 'redirectTo'

When closure compiler renames the redirectTo property to some short name, it won't rename the one in the ngfactory.ts because it's quoted.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions