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


here code : jsfiddle

  1. initialy should display data.

  2. i'm able add new tags , based on tag selection data filtering data should added below existing filtered data if new tag selected , data should removed if tag 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

Popular posts from this blog

c - Calling a function within a loop -

vb.net - Unbound DataGridView add row with checkbox error -

How i fill combobox items in Radgridview manually using in vb.net -