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

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -