ngx-mask icon indicating copy to clipboard operation
ngx-mask copied to clipboard

build with aot and global options not working

Open LaserUnicorns opened this issue 8 years ago • 5 comments

ngx-mask version - 6.2.8 angular version - 6.1.9

app.module.ts

imports: [
  NgxMaskModule.forRoot({
    patterns: {
      D: {
        pattern: new RegExp('\\d'),
      },
    },
  }),
],

in template:

<input mask="DDD">

When I run ng serve --aot mask not working correctly, input only accepts character 'D'.

Cusotm global config in MaskService looks like this:

image

Notice there is no pattern field.

If I build application without aot - everything works fine.

LaserUnicorns avatar Oct 01 '18 15:10 LaserUnicorns

@LaserUnicorns Hi. We fixed this in new version 6.3.9

pryimakalex avatar Oct 03 '18 10:10 pryimakalex

Still not working in 6.3.11. Seems like angular compiler strips regexes in aot mode.

LaserUnicorns avatar Oct 03 '18 18:10 LaserUnicorns

Still not working in latest version 6.5.17

akpatel7 avatar Oct 11 '18 19:10 akpatel7

Any news? Still not working in 7.3.3

asp-id avatar Jan 27 '19 13:01 asp-id

Same thing, not working in ngx-mask v8.0.5 - even when using the built-in mask="comma_separator".

I'm running Angular v7.2.6

Marcidius avatar Sep 11 '19 16:09 Marcidius