Skip to content

Importing RouterTestingModule in spec files causes AOT/ngc compiler to fail #11276

@qdouble

Description

@qdouble

I'm submitting a ... (check one with "x")

[x] bug report

Current behavior
If I have RouterTestingModule imported in any of my spec files, I will get the following error:

Error: parameters received {"filePath":"/Users/qdouble/Sites/MAIN_PROJECT/node_modules/@angular/common/src/location/location.d.ts","name":"Location"} which is not a StaticSymbol

Expected/desired behavior
First of all, there should be an option to make the ngc compiler ignore spec files (other than having to go back and forward in changing your tsconfig setting to ignore spec files). I'll also assume that if it's evaluating spec files, it would make the compilation slower.

Beyond fixing the RouterTestingModule bug, I think ngc should be a setting to make ngc/aot ignore spec/e2e files.

  • Angular version: 2.0.0-builds --- latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: coreIssues related to the framework runtimeneeds reproductionThis issue needs a reproduction in order for the team to investigate further

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions