Error in directive implementation of regex test as attribute - validations (typescript + angular)
问题 I'm trying to build a module that has directive for custom validations. The validations are done via regex. The error I am seeing is: Error: [$injector:unpr] Unknown provider: REG_EXPProvider <- REG_EXP <- uniIdValidatorDirective My code looks like this: config.ts: module LoginModule { 'use strict'; /***** REGEX *****/ export class regExp { public ID_OR_PASSPORT = /^[0-9]{9}$/; public USERNAME_SINGLE_WORD = /^[A-Za-z0-9à-ú-_\.]{6,8}$/; public PASSWORD = /^[A-Za-z0-9à-ú-_\.]{8}$/; public EMAIL