javascript - angular-ui select2 breaks data-binding -
i have service stores data single source of truth, controllers can change model making calls service , other controllers synchronized model data.
angular.module('fmappapp').factory('categoryservice', function(category) { var catserviceinstance, categories; categories = category.query(); // category ng-resource return catserviceinstance = { getcategories: function() { return categories; }, addcategory: function(category) { categories.push(category) } }; });
it working both in chrome , firefox untill integrated angular-ui select2 module utilize ui-select
directive. populate options this:
<ui-select-choices refresh="addnewobj($select.search)" refresh-delay="0" repeat="category in categories | filter: {name: $select.search}">
now when add category in 1 controller don't see appear in dropdown list. strangely, in firefox. in chrome works fine. i'd hear explanation , actions need take make work in both these browsers.
Comments
Post a Comment