javascript - AngularJs filtering data based on option selection and tag creation based on selection -
here code : jsfiddle
initialy should display data.
i'm able add new
tags
, based ontag
selection data filtering data should added below existing filtered data if newtag
selected , data should removed iftag
deleted.
finally
everything
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
Comments
Post a Comment