Input for typing IP address with working pattern and number keyboard

Hi, i need an input for typing an ip-address. So i used the input text with pattern="\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}" this was working. But the virtual Keyboard showed everything, and i just need numbers and the dot. So i used the input type=“number”. But the problem is that my submit Button is not working correctly because the pattern is not working for numbers.
Also my ng-model is not working, the ip-address in my model is not shown in the input, because a ip-address is no number.

can i use input type text, but somehow tell the phone just to show a virtual keyboard with numbers and the signs?

you can use something like this directive for that type of input