Search code examples
htmlangularjsselectbrowserinternet-explorer-10

HTML select tag default option showing blank on IE10


I am working on an angularjs project where I am using HTML select tag to show a dropdown but I am facing a specific issue in IE10 where the default option is not visible for first time when i select any option the first letter is visible then again if i select any option the full value can be seen


Solution

  • Showing some of your code would be helpful.

    Here is an example of a possible solution. Assume we have the following data:

    $scope.items = [
        { Name: 'First', Id: 1 },
        { Name: 'Second', Id: 2 },
        { Name: 'Third', Id: 3 },
    ];
    

    You can show it in the template for example in this way:

    <select ng-model="selected"ng-options="item.Id as item.Name for item in items">
        <option value="">-- select --</option>
    </select>
    

    Check the documentation for more info.