AngularJs filtering data based on option selection and tag creation based on selection

前端 未结 1 747
慢半拍i
慢半拍i 2021-01-17 05:23

Here is my code : Jsfiddle

  1. Initialy its should display all the data.

  2. I\'m able to add new tags and based on tag

相关标签:
1条回答
  • 2021-01-17 06:00

    finally Everything is resolved.

    //FILTER

        .filter('findobj', function () {
         return function (dataobj, multipleVlaue) {
             if (!multipleVlaue) return dataobj;
             return dataobj.filter(function (news) {
                 var tofilter = [];
    
                 angular.forEach(multipleVlaue,function(v,i){ 
                  tofilter.push(v);
                 });
    
                 return news.CategoryList.some(function (category) {
                return tofilter.indexOf(category.DisplayName)>-1;
             });
    
             });
         };
         })
    

    Here u can refer : CODE

    0 讨论(0)
提交回复
热议问题