I have a input
where you can type in a URL. Now I also like to add a suggestion list to the input where you can select predefined URLs.
My attempt was to change from type=url
to type=select
and provide a datalist:
<input type=select list=servers required ng-model=server />
<datalist>
<option label="Server example 1" value="https://www.google.de/"/>
</datalist>
But now I am missing the URL validation from angular.
Is there a way to combine those two types? Or any other suggestion how I can do that?
Thanks in advance
Source: AngularJS
from Angular Questions https://angularquestions.com/2017/10/20/angular-input-typeselect-url/
via @lzomedia #developer #freelance #web #lzomedia.com
No comments:
Post a Comment