Bootstrap-multiselect conflict with Angularjs, unable to select, load delay issue:
Defer loading of the MultiSelect () method, code:
1$scope. Mulselect =function(){2$timeout (function () {3$ (' #camera-select '). MultiSelect ({4Nonselectedtext: ' All ',//button displays a value when there is no value5Includeselectalloption:true,6Selectalltext: ' Select All ',//Select checkbox name for all7Buttonwidth: ' 133px ',//button Width8maxheight:2009 });Ten}, 200); One}
In addition, because of the conflicting problems caused by getting the sequential loading order between data and loading plug-in styles, you can load the data first and then call the plug-in loading method:
1 $http. Post ($scope. url+ ' Camera/getcameralist ', $scope. Searchcamera). Success (function(data) {2 $scope . Cameralist = data.data.list; 3 $scope. Mulselect (); 4 });
Bootstrap-multiselect and Angularjs conflict