ng-click not working in IE but works fine in CHROME

<select id="from" multiple="multiple" name="list" ng-model="selectedVal">
    <optgroup label= "{{geo.Geo}}" ng-repeat="geo in Geographies"> 
        <option id="{{country.CountryKey}}" ng-repeat="country in geo.Country" ng-click="arrayPush()">{{country.CountryDescription}}</option>   
    </optgroup>
</select>

arrayPush() is not being called when I am clicking a specific option

$scope.arrayPush = function(){alert("Hello!");}

Answers


I just found-out the answer to my question

<select id="from" multiple="multiple" name="list" ng-model="selectedVal" ng-change="arrayPush()">
    <optgroup label= "{{geo.Geo}}" ng-repeat="geo in Geographies"> 
        <option id="{{country.CountryKey}}" ng-repeat="country in geo.Country" >{{country.CountryDescription}}</option>   
    </optgroup>
</select>

Instead of using ng-click in option, use an ng-model and ng-change in select. Works in both Chrome and IE


Need Your Help

What's the proper way to run some Python code asynchronously?

python flask upstart

I needed to send mail from my plain Flask app, so I thought the simplest way would be to send it using smtplib. But I had to do it asynchronously - you can't just insert a 3 second delay into the r...

Menu disapear when scrolling down in bootstrap

javascript css

In www.preciseos.com, the top menu is showing up only after you scroll down bellow the fold.