I have a field defined in configuration file in backend as :
'pattern' : '/^[a-zA-Z. ]+$/'
and I am accessing this pattern as
ng-pattern = "{{field.pattern}}"
in the html. But the pattern is not working, I have debugged and verified the value of pattern it is pattern: "/^[a-zA-Z. ]+$/"
on front end, if I replace ng-pattern with :
ng-pattern= "/^[a-zA-Z. ]+$/"
Then everything works fine . Why it is that and how to pick the pattern which is defined in the backend config , so that
ng-pattern = "{{field.pattern}}"
this expression works in html. Thank you
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…