angularjs - Dynamically filtering dropdown in Angular js based on another dropdown selection -


i using angular strap bs-select , trying update dropdown 2 data based on dropdown1. not sure on how achieve behavior . tried following code didn't helped

<button type="button" ng-model="filters.selectedcategory" name="categoryfilter"                 data-html="1" ng-options="category.categoryid category.name category in filterlist.categoryfilter" placeholder="select category"  bs-select> </button> <button type="button" ng-model="filters.selectedsubcategory" name="subcategoryfilter"                 data-html="1" ng-options="category.categoryid category.name category in filterlist.subcategoryfilter | filter: {parentcategoryid:filters.selectedcategory}"                 placeholder="select sub.cat" bs-select> </button> 

in above subcategoryfilter button if use hardcoded filter, list filtering: {parentcategoryid:11}".

so how populate subcategoryfilter button dynamically whenever there change in category dropdown. assumption ng-repeat sample of angular whenever ng-model/scope gets changed list filterd. looks misunderstood , missing here


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -