I am puzzled as to why this code isn't working on Chrome but works perfectly fine on FireFox
SelectModel
selectModel: [
{
value: "asc", htmlText : "A-Z", selected: ""
},
{
value: "desc", htmlText : "Z-A", selected: ""
},
{
value: "startDate", htmlText : "Date", selected: ""
}
]
html
<option ng-click="sortContent(item)" ng-selected="item.selected" class="sort_option" value="{{item.value}}" ng-repeat="item in selectModel">
{{item.htmlText}}
</option>
========================================================================= Directive:
return {
restrict: 'E',
replace: true,
scope: {
},
link: function (scope, element, attributes) {
scope.sortContent = function(item_){
console.info("???????????????????????????????????????????????????????????????????????????????")
}
}
The issue lies in the fact that the function doesn't seem to be triggering on Google Chrome
You can test it out here: Runs smoothly on FireFox, but not on Chrome _ https://jsfiddle.net/bt6hmbvf/1/