javascript - How to preselect a option - Dropdown -


my html static variant, not solution builded ng-repeat or existing json/angular controler.

i need select custom option , used alreay ng-select without success.

my html looks like:

        <div class="btn-group" dropdown>         <button type="button" class="pull-right btn btn-block btn-dropdown" dropdown-toggle>             <div class="pull-left">                 <i class="flag-{{my.filter.flag}} left vcenter"></i>                 <span class="vcenter">{{my.filter}}</span>             </div>             <div class="pull-right"><span class="caret"></span></div>         </button>         <ul class="dropdown-menu" dropdown-menu ng-init="options[0]">             <li ng-class="{active: my.filter == 'germany'}">                 <a ng-click="my.filter = 'germany'; my.filter.flag='deu'"><i class="flag-deu"></i><span>germany</span></a>             </li>             <li ng-class="{active: my.filter == 'england'}">                 <a ng-click="my.filter = 'england'; my.filter.flag='gbp'"><i class="flag-gbp"></i><span>england</span></a>             </li>         </ul>     </div> 

so how can solve preselect option "germany" pageloading div.pull-left section?

you mention ng-select in question, used ng-selected. maybe typo.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -