I want to provide multiple selection using check-box
and depending on that it will create a tag
using angular directive
.
If user selects multiple check-box then according to that tags
should create and if user remove any tag then check-box should be unchecked. So depending on a selection and a removal of tag data should be filter
out.
Here is my Working CODE
Thanks in Advance.!
Sounds like you are looking for some pre-built code.
You can use Angular-multi-select in combination with a custom filter.
//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 the Solution