I don't think I tried this particular approach.   However, how do we support when the pattern is null?   My initial idea was to have the pattern variable be optional.  I think angular didn't like having the ng-pattern attribute as null. 

Let me create an issue to explore this option.