For support questions, please consider using Gitter - Chat
I'm submitting a ...
[X] bug report
[ ] feature request
[ ] question about the decisions made in the repository
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Create an angulartics module with configuration:
NOTE: I'm using this RegEx as example, but this happens with any other Regex as well
What is the expected behavior?
The ids matching the regex to be filtered out. However, this does not happen.
I've ben debugging in lower level, and it seems that using a regular expression with new Regex() ends with Angulartics2 loading the default value instead.
A workaround is to write it as a string and skipping the typescript checks.
What is the motivation / use case for changing the behavior?
If you try with JIT, it works as expected, but AOT seems to be breaking the regex somehow.
For support questions, please consider using Gitter - Chat
I'm submitting a ...
[X] bug report
[ ] feature request
[ ] question about the decisions made in the repository
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem Create an angulartics module with configuration:
And compile the application with AOT.
Then, check any URL matching this regex
NOTE: I'm using this RegEx as example, but this happens with any other Regex as well
The ids matching the regex to be filtered out. However, this does not happen. I've ben debugging in lower level, and it seems that using a regular expression with
new Regex()
ends with Angulartics2 loading the default value instead.A workaround is to write it as a string and skipping the typescript checks.
I have also seen that I'm not the only one with the same issue: https://stackoverflow.com/questions/54826529/angulartics-new-regexp-doesnt-appear-in-aot
What is the motivation / use case for changing the behavior? If you try with JIT, it works as expected, but AOT seems to be breaking the regex somehow.
Environment:
Package Version
@angular-devkit/architect 0.13.3 @angular-devkit/build-angular 0.13.3 @angular-devkit/build-optimizer 0.13.3 @angular-devkit/build-webpack 0.13.3 @angular-devkit/core 7.3.3 @angular-devkit/schematics 7.3.3 @angular/cdk 7.3.3 @angular/cli 7.3.3 @angular/flex-layout 7.0.0-beta.23 @angular/material 7.3.3 @angular/pwa 0.13.3 @ngtools/webpack 7.3.3 @schematics/angular 7.3.3 @schematics/update 0.13.3 rxjs 6.4.0 typescript 3.2.4 webpack 4.29.0