0

I am using selectboxit plugin for the selection list on my angularJS page an have bind the "ng-change" event on it. But unfortunately, it is not giving me the data on change.

index.html

    <select data-ng-model="object.word" ng-change="test(object.word)" id="blog-cat">
                                <option value="" selected="selected">Select...</option>

                                <option ng-hide="item.name == ''" ng-repeat="item in businessParentItems track by $index" value="{{item.term_id}}" item-business-directive>{{item.name}}</option>
                            </select>
{{object.word}}

testCtrl.js

$scope.test = function(test) {
        console.log('got it!');
}

directive.js

resource_app.directive('itemBusinessDirective', function () {
    return function (scope, element, attrs) {
        if (scope.$last === true) {
                $('.resources-search-bar .container .select-part select').selectBoxIt();

        }
    };
});

Please help with this to render the ng-model value on change of selection list.

PKJ Dev
  • 25
  • 7

0 Answers0