I created an angular Value service that holds a regex than I attached it to the controller instance i.e.
myService.value('regexValue' {PASSWORD_REGEX: /passwordregex/})
myController(regexValue) {
this.regexValue = regexValue.PASSWORD_REGEX;
}
then I am trying to use this value in an input field data-ng-pattern attribute
<input type="password" data-ng-pattern="myController.regexValue.PASSWORD_REGEX">
this however does not seem to work with the ng-pattern directive.
My question is how can I get this to work?