I have two <md-autocomplete>
drop-downs. I would like to update the search list of the second drop-down based on the selection of the first dropdown.
Here is a prepared non-working plunker : http://plnkr.co/edit/GxQujjAcxYdawlANJd9O?p=preview
Description of wanted behavior:
when a user selects let's say "This is an A" from the first drop-down, I would like to update options to $scope.numbersA
, that is [1, 2, 3]. For input "This is a B" the corresponding number array is $scope.numbersB
, etc.
I cannot get this to work properly, on my app there is $http request for every change on the first drop-down. As specified here I am using .then() and not .success(). I have simplified the example in plunker because there is less code :)
Edit: I have just noticed the searchText in plunker is not working properly, that's because of my search function. This is not an issue, it works as it should on my app.